gha-budget
v0.1.3
Published
Estimate the dollar cost of a GitHub Actions workflow before you commit it. Per-runner pricing, monthly projections, JSON for CI.
Downloads
489
Maintainers
Readme
gha-budget
Estimate the dollar cost of a GitHub Actions workflow before you commit it. Per-runner pricing, matrix expansion, monthly projection. CLI and JSON output.
Try it without installing: paste a workflow into the in-browser budget. Same matrix expansion and pricing model, runs entirely client-side.
$ npx gha-budget --runs-per-day=30 --minutes=8
gha-budget 2026-04-27T05:55:00Z
Assumed: 8 min/job, 30 runs/day.
.github/workflows/ci.yml
job runs-on matrix min/run rate/min per-run
build ubuntu-latest 1 8 $0.008 $0.064
test ubuntu-latest 6 48 $0.008 $0.384
-> workflow per-run: $0.45
.github/workflows/release.yml
job runs-on matrix min/run rate/min per-run
build macos-latest 1 8 $0.080 $0.640
-> workflow per-run: $0.64
All workflows per-run total: $1.09
Daily (30 runs/day): $32.70
Monthly (30 days): $981.00Why
You write a new GitHub Actions workflow. You merge it. Two weeks later the CI bill triples. Why? You added a macOS matrix slot. macOS-latest is 10x the per-minute rate of ubuntu-latest.
Most teams discover this in the bill. gha-budget shows it before you
commit.
Install
npm install -g gha-budget
# or run on demand
npx gha-budgetUsage
gha-budget # audit .github/workflows of cwd
gha-budget path/to/repo # audit a specific repo
gha-budget --file ci.yml # one workflow file
gha-budget --runs-per-day=30 # default 20
gha-budget --minutes=8 # mean per-job runtime, default 5
gha-budget --json # machine-readable for CI
gha-budget --markdown # PR-comment friendlyPricing model
Source: GitHub Actions billing docs. Per-minute, USD, for GitHub-hosted standard runners (paid use beyond free monthly minutes).
| Runner family | per-minute | | - | - | | ubuntu-* (2-core) | $0.008 | | ubuntu-* 4-core | $0.016 | | ubuntu-* 8-core | $0.032 | | windows-* (2-core) | $0.016 | | macos-* (3-core) | $0.080 | | macos-* xlarge | $0.160 | | self-hosted | $0.000 |
Matrix expansion is counted: a job with os: [ubuntu, windows, macos]
and node: [18, 20] becomes 6 matrix slots. Each slot pays the runner
rate for the assumed minutes.
Caveats
This is a budget estimate, not a guarantee.
- The big unknown is real per-job runtime. Default of 5 min is the
community median for small workflows. Override with
--minutes=Nor use the per-job timing from your billing dashboard for sharper numbers. if:conditions,continue-on-error, and dynamic matrix (fromJSON()) cannot be statically evaluated. They count as if they always run.- Free-tier minutes are credited monthly. The dollar number you see here is the post-free-tier rate. If you stay under the free quota, out-of-pocket is zero; the budget here still tells you when you're about to exit the free tier.
Companion tools
ci-doctor- audit GHA workflows for waste, cost, security gaps. Use both:ci-doctorfinds the issues,gha-budgettells you what each one costs.depmedic- surgical npm vulnerability triage.cursor-rules-init- opinionated
.cursorrulesstarters.
- opinionated
Cut the bill
If gha-budget shows a number that surprises you, the deeper pattern
set for cutting it lives in the GHA cost cookbook
($19, free updates within v1.x).
License
MIT.
Sponsor / support depmedic
If this saved you 10 minutes of CI debugging, consider one of these. All of them keep the free CLIs free:
- Tip what you want — pay-what-you-want, $0 minimum: https://buy.polar.sh/polar_cl_tipjar?utm_source=npm&utm_medium=readme&utm_campaign=gha-budget
- depmedic Pro $5/mo — one license, unlocks Pro tier in every depmedic CLI + the VS Code / Cursor extension, free access to every paid playbook for as long as you stay subscribed: https://buy.polar.sh/polar_cl_SUzmX5RCQCV8MJV3dDEBFMu3MGWu2WQhzZ1s02ZhK09?utm_source=npm&utm_medium=readme&utm_campaign=gha-budget
- Everything Bundle $59 once — every paid playbook (current and future): https://buy.polar.sh/polar_cl_everything_bundle?utm_source=npm&utm_medium=readme&utm_campaign=gha-budget
- Sponsor on GitHub — https://github.com/sponsors/depmedicdev-byte
More from depmedic
| | |
| --- | --- |
| ci-doctor | audit GitHub Actions for cost + security (16 rules) |
| gitlab-ci-doctor | same engine for .gitlab-ci.yml (14 rules) |
| bitbucket-ci-doctor | for bitbucket-pipelines.yml (8 rules) |
| azure-pipelines-ci-doctor | for azure-pipelines.yml (8 rules) |
| circleci-ci-doctor | for .circleci/config.yml (8 rules) |
| gha-budget | $-denominated cost estimate of any GHA workflow |
| pin-actions | one-shot SHA pinner for uses: blocks |
| cursor-rules-init | scaffold .cursor/rules/ for your stack |
| depmedic | all-in-one cli, finds outdated/risky deps |
| depmedic/ci-doctor-action | composite GitHub Action: PR comment + SARIF |
In-browser scanners (no install): GitHub · GitLab · Bitbucket · Azure · CircleCI.
Newsletter (weekly, low-volume): https://depmedicdev-byte.github.io/newsletter.html?utm_source=npm&utm_medium=readme&utm_campaign=gha-budget.
