Calculate the exact break-even point and total monthly bill between GitHub Actions Hosted Runners and Self-Hosted Dedicated / Cloud Runners (Hetzner, AWS EC2 Spot, Kubernetes ARC). Model per-minute billing, concurrent build queues, NVMe cache acceleration, and DevOps operational maintenance costs.
1. Pipeline Build Volume & Runner Hardware Tier
3. Monthly Spend, Net TCO Savings & Break-Even Point
Architectural Comparison: GitHub Hosted vs. Self-Hosted vs. Kubernetes ARC
| Evaluation Criteria | GitHub Hosted (Official) | Self-Hosted (Dedicated Bare Metal) | Kubernetes ARC (Autoscaling) |
|---|---|---|---|
| Billing & Cost Model | Pay per minute of execution ($0.008 to $0.16/min) | Flat monthly hosting fee (Unlimited minutes) | Cloud node pool cost + cluster control plane |
| Raw CPU & I/O Performance | Shared burstable vCPUs with variable noisy neighbors | 100% dedicated Zen 4/5 or Xeon cores + PCIe 4.0 NVMe | Containerized Kubernetes pods with CPU limits |
| Build Cache & Docker Layers | Slow: Network restore, 10 GB limit per repository | Instant: Persistent local SSD Docker daemon & caches | PersistentVolumeClaims (PVC) or shared registry |
| Operational Maintenance | Zero: 100% managed by GitHub infrastructure | Moderate: OS security updates, Docker pruning, runner tokens | High: Helm charts, CRD upgrades, Kubernetes scaling |
| Security & PR Isolation | Pristine ephemeral VM destroyed after every job | Persistent host: High risk if executing public fork PRs | Ephemeral pods automatically purged upon job completion |
Mathematical Formulas & CI/CD Cost Engineering
1. GitHub Hosted Minute Formula:
$$\text{Bill}_{GH} = \max(0, M_{total} - M_{free}) \times R_{tier}$$
Where $M_{total}$ is total build minutes, $M_{free}$ is plan quota, and $R_{tier}$ is per-minute unit price ($0.008 for 2-core Linux up to $0.160 for macOS).
2. Self-Hosted TCO Formula:
$$\text{TCO}_{SH} = (N_{servers} \times P_{server}) + (H_{devops} \times W_{devops})$$
Where $N_{servers} = \lceil C_{jobs} / K_{capacity} \rceil$ models required hardware servers for peak concurrency, $P_{server}$ is monthly hosting, and $H_{devops} \times W_{devops}$ accounts for monthly maintenance engineering time.
3. Break-Even Volume Equation: Self-hosting becomes mathematically profitable once:
$$M_{breakeven} = \frac{\text{TCO}_{SH}}{R_{tier}} + M_{free}$$
Beyond this volume, every additional minute costs essentially 0.00 € on dedicated hardware, transforming linear variable costs into fixed infrastructure.
Frequently Asked Questions (FAQ)
When does it become financially profitable to switch to self-hosted runners?
For Linux standard 2-core runners, the break-even point typically occurs around 15,000 to 20,000 minutes/month. For heavy multi-core builds (16-core Linux or macOS Apple Silicon), break-even happens at just 3,000 to 5,000 minutes/month due to GitHub's steep per-minute pricing multipliers.
Is it secure to run self-hosted runners on public or open-source repositories?
No. Running self-hosted runners on public repositories is dangerous because external contributors can submit Pull Requests executing arbitrary malicious code (crypto-mining or secret exfiltration) inside your persistent host. In public repos, use GitHub-hosted VMs or ephemeral runners with Actions Runner Controller (ARC).
Why do Docker builds and compilers run 2x to 4x faster on self-hosted runners?
GitHub-hosted runners start from a blank virtual disk every time, forcing network downloads of Docker layers and package caches. Self-hosted bare-metal servers keep caches warm on local high-speed PCIe NVMe drives, eliminating network round-trips and utilizing full uncapped CPU clock speeds.
What is Actions Runner Controller (ARC) and how does it auto-scale?
ARC is GitHub's official Kubernetes operator that dynamically provisions ephemeral runner pods inside a Kubernetes cluster based on webhook build queue demand. When no jobs are running, it scales to zero pods, eliminating idle server expenses while preserving strict ephemeral sandbox security.