Skip to content

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

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

hcarreras merged 3 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 the Sonar scan, 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 Sonar scan.

🤖 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 allows newer pushes to main to replace pending runs, skipping their CI and Sonar scans even when cancel-in-progress is false.

1 open issue
What changed in this PR

This PR reduces GitHub Actions usage by limiting CI to pull requests and pushes to main, instead of running on every branch push.

Changes:

  • Runs CI for pull requests, including drafts, and pushes to main.
  • Adds concurrency grouping to cancel outdated PR runs.
File Description
.github/​workflows/​ci.yml Restricts CI triggers and adds workflow concurrency controls.

Review effort: Balanced

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