8000 ci: Allow concurrency outside of pull requests · rust-lang/compiler-builtins@11cf244 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11cf244

Browse files
committed
ci: Allow concurrency outside of pull requests
When multiple merges to `master` happen before a CI run completes, the in-progress job is getting canceled. Fix this by using the commit sha for the group key if a pull request number is not available, rather than `github.ref` (which is always `refs/head/master` after merge). This should prevent jobs running on previous commits from getting cancelled, while still ensuring there is only ever one active run per pull request.
1 parent b76f6cc commit 11cf244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
concurrency:
77
# Make sure that new pushes cancel running jobs
8-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
99
cancel-in-progress: true
1010

1111
env:

0 commit comments

Comments
 (0)
0