Skip to content

Commit cb862c0

Browse files
authored
ci: supersede in-progress runs on push to main (#1167)
The concurrency group fell back to github.run_id when github.head_ref was empty, which is every push to main. A unique run_id per run meant no two runs ever shared a group, so cancel-in-progress never fired on main. A burst of merges then stacked CI and Docker runs that all ran to completion, saturating the shared (especially macOS) runner pool and pushing wall-clock into the hours through queue contention. Fall back to github.ref instead, so every push to a branch shares one group and the newer run supersedes the older one. Pull requests are unchanged: head_ref is still set there and keys the group by source branch.
1 parent 9264fe6 commit cb862c0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
contents: read
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1515
cancel-in-progress: true
1616

1717
jobs:

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
packages: write
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1515
cancel-in-progress: true
1616

1717
jobs:

0 commit comments

Comments
 (0)