Skip to content

ci: fix cross-PR concurrency cancellations (head_ref groups) - #74

Open
silvertakana wants to merge 1 commit into
mainfrom
fix/ci-concurrency-groups
Open

ci: fix cross-PR concurrency cancellations (head_ref groups)#74
silvertakana wants to merge 1 commit into
mainfrom
fix/ci-concurrency-groups

Conversation

@silvertakana

Copy link
Copy Markdown
Owner

Problem

Workflows using concurrency: group: ${{ github.workflow }}-${{ github.ref }} with cancel-in-progress: true collide across ALL pull requests: for pull_request/pull_request_target events github.ref resolves to refs/heads/main, so every PR shares one concurrency group. Verified live: 3 dependabot branches cancelled each other within 4 seconds of queuing.

Fix

Scope the group per PR using the PR head branch, falling back to github.ref for non-PR runs:

group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}

Files

  • .github/workflows/size-labeler.yml (line 8)
  • .github/workflows/plugin-ci.yml (line 33, group was plugin-ci-${{ github.ref }})

Workflow-only change; YAML validated. No version bump (ci-only).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant