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:
cliffhall 2026-07-04 18:36:43 -04:00
commit 3b9d38fbac

View file

@ -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