about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-05-29 19:01:03 +0000
committerTrevor Gross <tmgross@umich.edu>2025-05-29 19:01:03 +0000
commit3464b4b231e3e4a09e102696228fe950eb1672e5 (patch)
tree8a438cd839fd56061410602dac9c78e0d5f8c067
parentc136fb7734716a078cd82a7364245128923eb7e4 (diff)
downloadrust-3464b4b231e3e4a09e102696228fe950eb1672e5.tar.gz
rust-3464b4b231e3e4a09e102696228fe950eb1672e5.zip
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.
-rw-r--r--library/compiler-builtins/.github/workflows/main.yaml2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/compiler-builtins/.github/workflows/main.yaml b/library/compiler-builtins/.github/workflows/main.yaml
index 567ad1205a5..de433d8c74d 100644
--- a/library/compiler-builtins/.github/workflows/main.yaml
+++ b/library/compiler-builtins/.github/workflows/main.yaml
@@ -5,7 +5,7 @@ on:
 
 concurrency:
   # Make sure that new pushes cancel running jobs
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
   cancel-in-progress: true
 
 env: