diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-05-29 19:01:03 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-05-29 19:01:03 +0000 |
| commit | 3464b4b231e3e4a09e102696228fe950eb1672e5 (patch) | |
| tree | 8a438cd839fd56061410602dac9c78e0d5f8c067 | |
| parent | c136fb7734716a078cd82a7364245128923eb7e4 (diff) | |
| download | rust-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.yaml | 2 |
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: |
