ci: run CI on push to main only
GL
17h ago+3+3+0123456789-0-0-0123456789
CI ran twice for every commit on a feature branch with an open PR: once for push and once for pull_request. This limits the push trigger to main. PRs into main keep their run, and main keeps its post-merge run.
Before and after (2026-11-12 to 2026-11-19, billed minutes per job, rounded up)
| CI runs | Runs | Runner minutes |
|---|---|---|
| push to a feature branch (removed by this PR) | 28 | 216 |
| pull_request into main (unchanged) | 28 | 202 |
| push to main (unchanged) | 12 | 89 |
That is about 31 runner minutes a day on ubuntu-latest. The repo is public, so this frees concurrent runner slots and removes duplicate status checks rather than cutting a bill.
Verification
actionlintclean.- Branch rules on
mainrequire no status checks, so no required check changes name or stops reporting. - The push of this branch started no
CIpush run; the PR run is the only one.
Risk
A branch with no PR into main no longer gets CI on push. Opening a PR (draft included) runs it.
No runtime change, no demo.
Requested by guillaume@stackone.com
🤖 Generated with Claude Code
Summary by cubic
Limits the CI push trigger to main so feature branches stop running the full CI twice per commit (once for push, once for pull_request).
- Removes duplicate runner workload: 28 feature-branch push runs consumed 216 of 526 runner minutes in the week of 2026-11-12.
- Branches without a PR into
mainno longer get CI on push; opening a PR (draft included) runs it. - No required status checks are affected, since branch rules on
mainrequire none.