Skip to content

Commit 70d8231

Browse files
paulrutterclaude
andcommitted
FELIX-6807 - Cancel superseded CI runs per branch, not just per pull request
The concurrency group fell back to github.run_id for push events, which is unique per run, so pushes to a branch never superseded each other. Releasing six modules pushes twelve version-only commits in a row and queued twelve full four-JDK runs, none of which tested anything the last one does not. Group on github.ref instead, so a branch keeps at most one run in flight. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 73b1104 commit 70d8231

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎.github/workflows/maven-ci.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ on:
4646
- 'examples/**'
4747
- 'configadmin/**'
4848

49-
# Cancel superseded runs when a branch is pushed again. github.head_ref is only set
50-
# for pull_request events, so pushes to master fall back to the unique run_id and are
51-
# never cancelled.
49+
# Cancel superseded runs for the same branch. github.head_ref is only set for
50+
# pull_request events, so pushes fall back to github.ref, which groups per branch:
51+
# a release pushes a dozen version-only commits in a row, and only the last needs
52+
# building.
5253
concurrency:
53-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
54+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
5455
cancel-in-progress: true
5556

5657
permissions: {}

0 commit comments

Comments
 (0)