Skip to content

Commit 05bdbf5

Browse files
authored
CI: Cancel outdated PR builds when new commits are pushed to a PR branch (#47)
1 parent dbdef2b commit 05bdbf5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
- master
66
tags: '*'
77
pull_request:
8+
concurrency:
9+
# Skip intermediate builds: all builds except for builds on the `master` branch
10+
# Cancel intermediate builds: only pull request builds
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
813
jobs:
914
test:
1015
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)