Get the patterns that move that number
The depmedic GHA cookbook has 30 paste-ready patterns and 5 hardened workflow templates that close exactly the leaks above. $19, one-time, MIT-licensed templates.
Plug in your numbers. The math uses standard GitHub-hosted runner pricing ($0.008/min ubuntu, $0.016/min windows, $0.08/min macos, free minutes excluded). The waste percentages come from auditing thousands of public workflows; your repo will be similar.
The depmedic GHA cookbook has 30 paste-ready patterns and 5 hardened workflow templates that close exactly the leaks above. $19, one-time, MIT-licensed templates.
Without a concurrency block, a push-to-push-to-push streak runs CI three times for the same final state. On a busy repo with 50 pushes/day this is the single biggest leak.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Catch: for deploy workflows use cancel-in-progress: false so an in-progress deploy finishes.
macos-latest runs 10x the cost. windows-latest 2x. A test job that "happens to be" on macOS doubles or worse the bill of every PR.
jobs:
test:
runs-on: ubuntu-latest # not macos-latest unless you need xcodebuild
Catch: keep cross-platform tests, move them to a nightly schedule or workflow_dispatch.
Without cache:, setup-node/setup-python/setup-java re-download deps on every run. 30 to 90 seconds per job.
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Catch: cache keys depend on lockfiles; set cache-dependency-path if non-standard.
Concurrency for deploys, matrix collapsing, artifact retention,
fetch-depth, path filters, draft-PR skip, sparse checkout,
composite actions, reusable workflows, OIDC for AWS/GCP, dependency review,
pinning, secret scanning, the lot.
This page estimates total monthly waste from category percentages. To price your actual workflow file, paste it into budget — matrix expansion, real per-runner pricing, monthly projection. To see what is wasteful and how to fix it, paste it into audit.
ci-doctor + gha-budget ship as CLIs:
npx ci-doctor # audit
npx ci-doctor --fix # auto-apply the safe ones
npx gha-budget # price the workflow in dollars