Skip to content

ci: push and schedule runs get their own concurrency group; only PR runs cancel each other - #107

Open
askalf wants to merge 1 commit into
masterfrom
ci/concurrency-run-id
Open

askalf wants to merge 1 commit into
masterfrom
ci/concurrency-run-id

Conversation

@askalf

@askalf askalf commented Sep 23, 2026

Copy link
Copy Markdown
Owner

GitHub keeps at most one pending run per concurrency group and cancels the older pending one when another arrives, whatever cancel-in-progress says. The groups added in the Actions-audit PR were keyed on ${{ github.workflow }}-${{ github.ref }} for every event. So with a main-branch run A in progress and B queued, a third push C cancelled B, and a scheduled CodeQL run could be replaced the same way. The comment promised default-branch results were never dropped; a queued one could be. (Found by the second-opinion review.)

Now the group is ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}:

  • PR runs share one group per branch, and cancel-in-progress (still true for PRs only) cancels the superseded run.
  • Every push and schedule run gets its own group (its run id), so none is ever replaced or cancelled.

Validated: every workflow in the repo parses, and actionlint 1.7.7 is clean.

stealth.yml keeps its per-ref queue on purpose and is unchanged.

…uns cancel each other

GitHub keeps one pending run per concurrency group, so the shared workflow/ref group let a newer push replace a queued default-branch run. Non-PR events now group by run id; PR runs still share a per-branch group and cancel the superseded run.
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code size/S 10-49 hand-written lines labels Sep 23, 2026
@askalf
askalf enabled auto-merge (squash) September 23, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size/S 10-49 hand-written lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant