From 8d4ee0fe20cff4c40b8f72742106c796d92d7bf9 Mon Sep 17 00:00:00 2001 From: "ccf-lisa[bot]" <286799724+ccf-lisa[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 19:13:01 -0300 Subject: [PATCH] ci: key PR concurrency groups by PR number, not ref A merged PR's pull_request events (release-please's 'autorelease: tagged' relabel, the closed trigger) carry the base branch as github.ref, so a github.ref-keyed group with cancel-in-progress puts them in main's group and cancels the in-flight push-to-main run. Key PR runs by PR number, falling back to github.ref for push events. Task: W1-S3-FIX-CONCURRENCY --- .github/workflows/ci.yml | 4 +++- README.md | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d789a94..9668193 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,9 @@ permissions: contents: read concurrency: - group: ci-${{ github.ref }} + # Keyed by PR number: a merged PR's events (e.g. release-please's relabel) carry the base branch + # as github.ref, and would otherwise share, and cancel, main's push run. + group: ci-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: diff --git a/README.md b/README.md index aa2637f..be13832 100644 --- a/README.md +++ b/README.md @@ -434,7 +434,8 @@ on: permissions: contents: read concurrency: - group: preview-${{ github.ref }} + # PR number, not github.ref: a merged PR's events carry the base branch as github.ref. + group: preview-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: preview: