Skip to content

Commit

Permalink
add cancel-in-progress so pr builds do not wait stale jobs (via #102)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi authored Sep 16, 2022
1 parent a5045b1 commit 1b4aa17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
branches:
- 'master'

concurrency:
# On master/release, we don't want any jobs cancelled
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/70972844/1261287
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
build:
name: 'Tests (JDK ${{ matrix.java-version }}, ${{ matrix.os }})'
Expand Down

0 comments on commit 1b4aa17

Please sign in to comment.