Skip to content

chore(ci): stop merged PRs' cleanup runs from cancelling main - #7

Merged
sam-goodwin merged 1 commit into
mainfrom
fix/ci-concurrency
Oct 7, 2026
Merged

sam-goodwin merged 1 commit into
mainfrom
fix/ci-concurrency

Conversation

@sam-goodwin

Copy link
Copy Markdown
Collaborator

Main's CI for #6 (and #5) was cancelled after 3s:

Canceling since a higher priority waiting request for ci-refs/heads/main exists

A merged PR's closed event (the cleanup run) has github.ref == refs/heads/main, so it landed in main's concurrency group with cancel-in-progress: true and cancelled the push run.

 concurrency:
-  group: ci-${{ github.ref }}
+  # Grouped by PR number, not github.ref: a merged PR's `closed` run has
+  # github.ref = refs/heads/main and would otherwise cancel main's push run.
+  group: ci-${{ github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || github.ref }}
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Merging this runs main's CI, which deploys #6 to prod and re-records the README demo.

🤖 Generated with Claude Code

@sam-goodwin sam-goodwin changed the title fix(ci): stop merged PRs' cleanup runs from cancelling main chore(ci): stop merged PRs' cleanup runs from cancelling main Oct 7, 2026
A merged PR's `closed` run has github.ref = refs/heads/main, so it joined
main's concurrency group with cancel-in-progress and cancelled the push run.
Group pull_request runs by PR number instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sam-goodwin
sam-goodwin merged commit 08f33ef into main Oct 7, 2026
1 of 2 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.

1 participant