Skip to content

ci: run CI on push to main only - #83

Open
glebedel wants to merge 1 commit into
mainfrom
ci/push-ci-main-only
Open

glebedel wants to merge 1 commit into
mainfrom
ci/push-ci-main-only

Conversation

@glebedel

@glebedel glebedel commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

  • 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.

Written for commit 9ed6b84. Summary will update on new commits.

View guided diff Turn on auto-fix

Feature branches already get a pull_request run on the same commit, so the
push run repeated the whole lint, test matrix and build. Over 2026-11-12 to
2026-11-19, 28 feature-branch push runs used 216 of 526 runner minutes.

Requested by guillaume@stackone.com

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel glebedel self-assigned this Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants