ci: run CI on pushes to any branch, cancel superseded runs
Previously push-triggered CI ran only on main, so same-repo branches got no CI until a PR was opened (fork contributions were and remain covered by pull_request, which fires on open and on every subsequent push). Run on all pushes, and add a per-ref concurrency group so rapid amend-pushes cancel superseded runs. Same-repo branches with an open PR will run under both events; acceptable at this repo's scale. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AViME1R9ES2UXT1uQDx1TG
This commit is contained in:
parent
752985790e
commit
3b9d38fbac
1 changed files with 10 additions and 4 deletions
7
.github/workflows/python.yml
vendored
7
.github/workflows/python.yml
vendored
|
|
@ -2,10 +2,13 @@ name: Python
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
# Superseded runs on the same ref are cancelled (e.g. rapid amend-pushes)
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
detect-packages:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Reference in a new issue