Skip to content

Commit ca96c9b

Browse files
committed
Key the concurrency group on the ref rather than the commit
Carries over a review fix from wp-cli/.github#274, which introduced the same expression. The event name in the key is already what keeps a push to the default branch and the nightly schedule apart, so keying on the commit only prevented a new push from superseding the run it replaces — the opposite of what a 155-job fan-out wants. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jy4dmjymj9VmoTBaqrV4iX
1 parent 0edf68f commit ca96c9b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/testing.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ on:
1111
- cron: '0 0 * * *' # Run every day at midnight.
1212

1313
# Each run fans out to 155 jobs, so overlapping runs are expensive.
14-
# Pull requests group per branch so a new push supersedes the previous run.
15-
# Everything else groups per event and commit, so a push to the default branch
16-
# and the nightly schedule never cancel one another.
14+
# Keying on the ref lets a new push supersede the run it replaces, for pull
15+
# requests and branches alike. Keying on the event as well keeps a push to the
16+
# default branch and the nightly schedule from cancelling each other, since both
17+
# report the same ref.
1718
concurrency:
18-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
19+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
1920
cancel-in-progress: true
2021

2122
jobs:

0 commit comments

Comments
 (0)