Skip to content

ci: run CI only on pull requests and main - #1051

Merged
hcarreras merged 2 commits into
mainfrom
ci/run-on-prs-and-main
Nov 9, 2026
Merged

hcarreras merged 2 commits into
mainfrom
ci/run-on-prs-and-main

Conversation

@hcarreras

Copy link
Copy Markdown
Contributor

CI now runs on pull requests and on pushes to main. It no longer runs on pushes to branches that have no PR. When a new commit is pushed to a PR, the run for the older commit is cancelled.

Why: Abtion's GitHub Actions bill grew from about $66 a month in January to about $1,000 a month in October. To get checks on a branch before review, open a draft PR.

Invariants

  • Every PR still runs the full CI, so the required checks are still reported.
  • Every push to main still runs CI and deploys, and is never cancelled.

How to test (developer)

  • On this PR, the CI run is listed as a pull_request run and all checks report.
  • After merge, a push to main starts CI and the deploy.

🤖 Generated with Claude Code

Abtion's GitHub Actions bill grew from about $66 a month in January
to about $1,000 a month in October 2026.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The shared concurrency group can cancel pending CI runs for main pushes, violating the requirement that every main push runs CI and deploys.

1 open issue
What changed in this PR

This PR reduces GitHub Actions usage by limiting CI to pull requests and pushes to main, while cancelling outdated PR runs.

Changes:

  • Replaces unrestricted push triggers with pull-request and main push triggers.
  • Adds workflow concurrency to cancel older runs for the same PR.
  • Documents using draft PRs to get branch checks before review.
File Description
.github/​workflows/​ci.yml Narrows CI triggers and adds concurrency controls.

Review effort: Balanced

Comment thread .github/workflows/ci.yml Resolved
@hcarreras
hcarreras merged commit f677a5b into main Nov 9, 2026
7 checks passed
@hcarreras
hcarreras deleted the ci/run-on-prs-and-main branch November 9, 2026 16:03
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