Skip to content

Keep a late pull request run from cancelling the run of main - #193

Merged
splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:ci-concurrency
Nov 22, 2026
Merged

splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:ci-concurrency

Conversation

@splitbrain-bot

Copy link
Copy Markdown

PR #192 was merged 20 seconds after it was opened, before GitHub started its pull_request run. With its merge ref gone, that run got the ref of the base branch, refs/heads/main. It joined the concurrency group publish-refs/heads/main and cancelled the run of the merge commit ("Canceling since a higher priority waiting request for publish-refs/heads/main exists"). So no image was built for the merge. The late run then failed in the image build, because its token could not write the cache of GitHub Actions ("cache write denied: token has no writable scopes").

Changes:

  • The concurrency group of a pull request run is its number: publish-${{ github.event.pull_request.number || github.ref }}. A push to main keeps publish-refs/heads/main.
  • The three type=gha cache exports of pull request runs set ignore-error=true, so a refused cache write does not fail the build.

The cancelled run of the merge of #192 (44345270485) still needs a re-run on main.

A pull request that was merged before its run started got a run with the ref of the base branch. That run joined the
concurrency group of main and cancelled the run of the merge commit (merge of splitbrain#192), so no image was built for it. The
run then failed, because its token could not write the build cache. Pull request runs are now grouped by their number,
and a refused write to the cache of GitHub Actions no longer fails the image build.
@splitbrain
splitbrain merged commit 5a183fd into splitbrain:main Nov 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants