Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
# release.yml calls these jobs as its gates, since a tag does not start this workflow.
workflow_call:

# A push to a pull request cancels that pull request's run still going, whose head is no longer
# the one to merge. Every run of one pull request shares the group, so a re-run of an older run
# cancels the current head's run too: re-run only the newest. Any other run is a group of its own
# (its run id), so a run on main and the jobs release.yml calls always finish; release.yml calls
# this workflow only off pull requests. github.workflow is the caller's name in a call, which
# would keep a future caller's pull request apart from this workflow's own.
concurrency:
group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
name: build (${{ matrix.name }})
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ on:
permissions:
contents: read

# A push to a pull request cancels that pull request's older run (re-run only the newest, since a
# re-run cancels the head's run too). A tag's or a dispatch's run is never cancelled while it
# runs, though a newer run on the same ref replaces one still pending.
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
version:
Expand Down