GitHub Actions Cost Calculator & Minutes Optimization
GitHub Actions is free for public repositories but can become a significant line item for active private repos — especially if macOS runners are involved. This guide breaks down the pricing model, explains the OS multipliers most teams overlook, and walks through the highest-ROI optimizations to keep your CI costs under control.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JSON Formatter & Validator
Format, beautify, and validate JSON online. Paste your JSON to instantly pretty-print it with 2-space, 4-space, or tab indentation. Minify JSON too. Free, runs in your browser.
Open free tool →
Regex Tester
Free regex tester. Test regular expressions against multiple strings with expected match/no-match assertions — see instant pass/fail results. Built-in presets for email, URL, IPv4, and phone. Pro: unl
Open free tool →
Base64 Encoder & Decoder
Free Base64 Encoder & Decoder. Convert text, images, and any file to Base64 and back. Supports URL-safe Base64, image data URIs, and file download from Base64. Runs 100% in your browser — no data sent
Open free tool →
More Free Tools
Related Articles
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
Best AI Code Review Tools 2026: CodeRabbit, Sourcery, DeepCode & Bito Compared
Compare top AI code review tools for 2026: CodeRabbit, Sourcery, DeepCode, and Bito. Features, pricing, GitHub/GitLab integration, and choosing the right tool for your team.
AI Code Review Tools 2026: GitHub Copilot, CodeRabbit, Qodo Merge Ranked
Compare AI code review tools for 2026: GitHub Copilot code review, CodeRabbit, Qodo Merge, Sourcery, and PR-Agent. Pricing, accuracy, and GitHub integration.
AI Coding Tools Comparison 2026: GitHub Copilot vs Cursor vs Windsurf vs Cline
Comprehensive comparison of the best AI coding tools in 2026: GitHub Copilot, Cursor, Windsurf, and Cline. Pricing, features, model support, and real-world benchmarks.
AI Pair Programming in 2026: GitHub Copilot vs Cursor vs Claude Code
Master AI pair programming in 2026. Compare GitHub Copilot, Cursor, and Claude Code for autocomplete, chat, and agentic workflows. Includes setup guides and productivity tips.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →Pricing by Plan & OS Multipliers
Each GitHub plan includes a monthly free minutes allowance. Usage beyond the allowance is billed at per-minute rates that vary by runner OS. macOS runners are 10x the Linux price — the single most common source of surprise costs.
| Plan | Free minutes/mo | Linux $/min | Windows $/min | macOS $/min |
|---|---|---|---|---|
| Free | 2,000 | $0.008 | $0.016 | $0.080 |
| Pro | 3,000 | $0.008 | $0.016 | $0.080 |
| Team | 3,000 | $0.008 | $0.016 | $0.080 |
| Enterprise | 50,000 | $0.008 | $0.016 | $0.080 |
OS multipliers applied to free minutes: Linux 1x, Windows 2x, macOS 10x. A 10-minute macOS job consumes 100 minutes from your free allowance.
Concurrency Groups — Cancel Superseded Runs
Add a concurrency group to your workflows to automatically cancel in-progress runs when a new commit is pushed to the same branch. This alone can cut wasted minutes by 40–60% on active feature branches.
name: CI
# Cancel previous runs on the same branch when new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: ['**']
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test Job Conditions — Skip Expensive Jobs Smartly
Use path filters and branch conditions to skip expensive jobs when they are not needed. An E2E test suite that only runs on main saves hundreds of minutes per month on teams with active PR pipelines.
jobs:
# Cheap: runs on every push
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test:unit
# Expensive: only runs on main branch or manual trigger
e2e-test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- run: npm run test:e2e
# Skip if only docs changed (use dorny/paths-filter)
build:
runs-on: ubuntu-latest
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'src/**'
- 'package.json'
- if: steps.filter.outputs.src == 'true'
run: npm run build Cost Estimation Formula
Use this formula to estimate your monthly GitHub Actions spend before you get a surprise invoice.
# Monthly cost estimation formula
#
# total_raw_minutes = sum of (actual_job_duration * os_multiplier)
# Linux multiplier = 1x
# Windows multiplier = 2x
# macOS multiplier = 10x
#
# billable_minutes = max(0, total_raw_minutes - plan_included_minutes)
# monthly_cost = billable_minutes * $0.008
# Example: Team with 5 devs, 80 PRs/month
# Pipeline per PR: 8min Linux CI + 5min macOS build
#
# Linux: 80 * 8 * 1 = 640 raw minutes
# macOS: 80 * 5 * 10 = 4,000 raw minutes
# Total raw: 4,640 minutes
# Plan allowance (Team): 3,000 minutes
# Billable: 4,640 - 3,000 = 1,640 minutes
# Cost: 1,640 * $0.008 = $13.12/month
#
# FIX: Move macOS build to only run on main (8 merges/month):
# macOS: 8 * 5 * 10 = 400 raw minutes
# Total: 640 + 400 = 1,040 minutes → within free allowance → $0/month Frequently Asked Questions
How does GitHub Actions billing work for private repositories?▼
GitHub Actions usage on private repos is billed by minutes per month. Each GitHub plan includes a free minute allowance: Free (2,000 min), Pro (3,000 min), Team (3,000 min), Enterprise (50,000 min). Once you exceed the included minutes, you are billed per-minute: Linux $0.008/min, Windows $0.016/min, macOS $0.08/min. Public repositories get unlimited free minutes on all plans. Minutes are tracked per billing cycle and reset monthly.
Why do Windows and macOS runners cost more?▼
GitHub applies cost multipliers based on operating system. Linux runners (ubuntu-latest) count at 1x. Windows runners count at 2x — a 10-minute Windows job consumes 20 minutes from your allowance. macOS runners count at 10x — a 10-minute macOS job consumes 100 minutes. This reflects the actual infrastructure cost differences. If you are running macOS jobs for tasks that do not require macOS (like unit tests), switching to ubuntu-latest can cut those minutes by 90%.
What are concurrency groups and how do they save money?▼
Concurrency groups cancel in-progress or queued runs when a new run for the same group is triggered. Set concurrency: { group: '${{ github.workflow }}-${{ github.ref }}', cancel-in-progress: true } on your workflow. This prevents wasted minutes on commits that are immediately superseded — if you push 5 commits in quick succession, only the latest run executes. For feature branches this is almost always the right behavior. Avoid it on the main branch where you want all runs to complete.
Are self-hosted runners free?▼
Yes — actions minutes are not charged for jobs running on self-hosted runners. You only pay for the underlying infrastructure (EC2, GCE, Azure VM, etc.). Self-hosted runners are cost-effective when you have predictable, high-volume workloads, need specialized hardware (GPU, ARM, high memory), or require access to private networks. The tradeoff is operational overhead: you manage scaling, security patching, and availability. GitHub's larger hosted runners (8-core, 16-core) are a middle ground — faster than standard runners, no maintenance.
How do I estimate my monthly GitHub Actions cost?▼
Formula: monthly_cost = max(0, total_minutes - included_minutes) * per_minute_rate. Where total_minutes = sum of (job_duration_minutes * os_multiplier) across all workflow runs. Track your current usage at Settings → Billing → GitHub Actions. For a team running 100 PRs/month with a 10-minute Linux pipeline each: 100 * 10 * 1 = 1,000 minutes. On Team plan (3,000 free minutes), this is within the free tier. Add a 15-minute macOS build: 100 * 15 * 10 = 15,000 additional minutes = $96/month extra.
What is the most effective way to reduce GitHub Actions costs?▼
In order of impact: (1) Use Linux runners for any job that doesn't require Windows/macOS — biggest win if you have accidental macOS jobs. (2) Add concurrency groups to cancel superseded runs on feature branches. (3) Add job conditions (if: github.ref == 'refs/heads/main') to skip expensive jobs on draft PRs or docs-only changes. (4) Cache dependencies to reduce job duration. (5) Split workflows — run expensive jobs (full E2E, security scan) only on main merge, not every PR push.