Skip to main content

Understanding CI/CD Costs

This guide explains how GitHub Actions billing works and how CICosts helps you understand and manage your costs.

GitHub Actions Billing Model

How GitHub Charges

GitHub Actions charges based on:

  1. Minutes used - Actual runtime of your jobs
  2. Runner type - Larger runners cost more per minute
  3. Operating system - Windows and macOS cost more than Linux

Billing Calculation

Cost = Minutes × Rate per Minute

Where:

  • Minutes are rounded up to the nearest minute
  • Rate depends on runner size and OS

Runner Pricing

RunnerLinuxWindowsmacOS
2-core (default)$0.008/min$0.016/minN/A
4-core$0.016/min$0.032/min$0.08/min
8-core$0.032/min$0.064/min$0.12/min
16-core$0.064/min$0.128/min$0.24/min
32-core$0.128/min$0.256/minN/A
64-core$0.256/min$0.512/minN/A

Free Minutes

GitHub includes free minutes with some plans:

PlanFree Minutes (Linux)
Free2,000 minutes
Pro3,000 minutes
Team3,000 minutes
Enterprise50,000 minutes

Windows and macOS minutes are charged at higher multipliers:

  • Windows: 2x multiplier
  • macOS: 10x multiplier

What CICosts Tracks

Gross Costs

CICosts calculates gross costs - what you would pay without free minutes:

Gross Cost = All minutes × Runner rate

This helps you understand true resource consumption regardless of your plan.

Why Gross Costs?

  1. Consistency - Compare costs across plans
  2. Forecasting - Predict costs if you exceed free minutes
  3. Optimization - Find waste even within free tier
  4. Planning - Budget for growth

Mapping to Actual Bill

Your actual GitHub bill may be lower:

Actual Bill = max(0, Gross Cost - Free Minute Value)

CICosts shows both gross and estimated actual costs.

Understanding Your Spending

Where Money Goes

Typical cost distribution:

CategoryTypical %
CI/Test workflows40-50%
Build/Deploy20-30%
Scheduled jobs10-20%
Other10-20%

The 80/20 Rule

Usually, 20% of workflows cause 80% of costs. CICosts helps you identify:

  • Which workflows are expensive
  • Why they're expensive
  • How to optimize them

Cost Factors

Job Duration

Longer jobs cost more:

# This costs more
- run: npm test # 10 minutes = $0.08

# Than this
- run: npm test --parallel # 5 minutes = $0.04

Runner Size

Larger runners cost more per minute:

# Expensive
runs-on: ubuntu-latest-32-core # $0.128/min

# Cheaper
runs-on: ubuntu-latest # $0.008/min

But larger runners can reduce total time:

ScenarioRunnerTimeCost
A2-core30 min$0.24
B8-core8 min$0.26
C16-core5 min$0.32

Operating System

macOS is significantly more expensive:

# Most expensive
runs-on: macos-latest # $0.08/min (4-core)

# Much cheaper
runs-on: ubuntu-latest # $0.008/min (2-core)

Matrix Builds

Matrix builds multiply costs:

strategy:
matrix:
os: [ubuntu, windows, macos] # 3 jobs
node: [16, 18, 20] # × 3 versions
# = 9 total jobs

This 10-minute workflow costs:

  • 1 Ubuntu job: $0.08
  • 9 matrix jobs: $0.72+

Workflow Triggers

Trigger frequency affects costs:

TriggerTypical Cost
push (main only)Low
push (all branches)Medium
pull_requestMedium
schedule (hourly)High
workflow_dispatchVaries

Reading CICosts Data

Dashboard Metrics

MetricWhat It Means
TodayCost so far today
vs AverageComparison to your typical day
This MonthMTD spending
ProjectedEstimated month-end total

Trend Analysis

Look for:

  • Spikes - Unusual high-cost days
  • Patterns - Weekly or monthly cycles
  • Trends - Increasing or decreasing over time

Per-Workflow Analysis

For each workflow, check:

  • Average cost per run
  • Success rate (failed runs still cost)
  • Run frequency
  • Duration trend

Key Questions to Ask

  1. Which workflows cost the most?

    • Check the "Top Workflows" view
  2. Are we using appropriate runners?

    • Check runner type distribution
  3. Are matrix builds necessary?

    • Compare matrix size vs. value
  4. How much do failures cost?

    • Check failure rate and cost
  5. Are scheduled jobs worth it?

    • Compare scheduled job costs to value

Next: Optimizing Workflows →