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: