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 →
- Find the expensive workflows (the billing usage report shows minutes by repo and workflow).
- Cancel superseded runs on the same branch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- Add
pathsfilters so docs-only changes don't run the full suite, and cache dependencies and Docker layers. - Use the right runner size: larger runners cost more per minute but can be cheaper overall if they finish much faster. Measure both.
- Move heavy, steady workloads to self-hosted runners on Spot (Actions Runner Controller on EKS).
- 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.
More on Cost
The AWS bill jumped 40% this month and finance wants an explanation by tomorrow. How do you find out why?BeginnerThe "NAT Gateway – data processed" line is $9,000 a month. How do you bring it down?IntermediateCut EKS compute cost by 40% without hurting reliability. What's your plan?AdvancedDev and test environments run 24/7 but are used only during office hours. How do you cut that cost?BeginnerCloudWatch Logs costs more than the EC2 fleet. What do you do?IntermediateFinance asks you to buy commitments. Savings Plans or Reserved Instances, and how much?Intermediate