fix(ci): let a push to main finish its Lint and Build runs
The concurrency group was the ref, so a second merge to main cancelled the run of the first. Key the group on the sha outside pull requests and cancel only on pull_request. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
32018e27f0
commit
705b370e23
3 files changed
+10
-5
No files matched your search
@@ -18,9 +18,11 @@ on: # yamllint disable-line rule:truthy
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# A newer push to the same pull request cancels the running run; a push to main or a tag
|
||||
# never cancels another run.
|
||||
concurrency:
|
||||
group: build-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
group: build-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -19,10 +19,11 @@ on: # yamllint disable-line rule:truthy
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# A newer push to the same ref makes the running lint obsolete.
|
||||
# A newer push to the same pull request makes the running run obsolete. A push to main or a
|
||||
# tag is never cancelled: each merge commit keeps its own result.
|
||||
concurrency:
|
||||
group: lint-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
group: lint-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
trivial:
|
||||
- A later push to main no longer cancels the Lint and Build runs of an earlier one; pull request runs still cancel their predecessors.
|
||||
Reference in new issue
Block a user