The GitHub Actions bill doubled. How do you reduce CI cost?

IntermediateScenarioCost
Answer

Situation read → CI cost is minutes multiplied by runner price. Most waste is redundant runs, no caching and oversized runners.

What I'd do →

  1. Find the expensive workflows (the billing usage report shows minutes by repo and workflow).
  2. Cancel superseded runs on the same branch:
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
  1. Add paths filters so docs-only changes don't run the full suite, and cache dependencies and Docker layers.
  2. Use the right runner size: larger runners cost more per minute but can be cheaper overall if they finish much faster. Measure both.
  3. Move heavy, steady workloads to self-hosted runners on Spot (Actions Runner Controller on EKS).
  4. Avoid macOS and Windows runners unless needed; they cost several times more per minute.

Why → Cancel-in-progress and path filters alone usually remove a big share of minutes.

Interview tip → Mention that a larger runner can lower total cost; it shows you think in total spend, not price per minute.

All Real-World Interview questions Roadmap: Interview readiness

More on Cost