Skip to content

Commit 334363d

Browse files
authored
CI: a merge no longer cancels a Python wheel build (#141)
Runs on main, by hand and for releases each get their own concurrency group; only a pull request's runs replace each other. A push to main cancelled a manual wheel build part way.
1 parent d9d2a7b commit 334363d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/python.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ on:
1919
types: [published]
2020
workflow_dispatch:
2121

22+
# A new push to a pull request replaces its earlier run. Runs on main, by hand and for releases
23+
# are never cancelled: a merge landing mid-build must not stop the wheels being built.
2224
concurrency:
23-
group: ${{ github.workflow }}-${{ github.ref }}
24-
cancel-in-progress: true
25+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-${{ github.event_name != 'pull_request' && github.run_id || 'pr' }}
26+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2527

2628
env:
2729
CARGO_TERM_COLOR: always

0 commit comments

Comments
 (0)