ci: run CI on push to main only

GL
17h ago
+3-0

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 runsRunsRunner minutes
push to a feature branch (removed by this PR)28216
pull_request into main (unchanged)28202
push to main (unchanged)1289

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

  • actionlint clean.
  • Branch rules on main require no status checks, so no required check changes name or stops reporting.
  • The push of this branch started no CI push 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 main no longer get CI on push; opening a PR (draft included) runs it.
  • No required status checks are affected, since branch rules on main require none.