手動計算一個月的 GitHub Actions 成本:GitHub 收費 $54,5 GHz 裸機只需 $11
A month of GitHub Actions, worked by hand: $54 on GitHub, $11 on 5 GHz bare metal
Sengi 比較 GitHub Actions 與其託管 runner 的成本和執行時間,指出 runner 的每分鐘價格及所需分鐘數都會影響帳單。以 GitHub Team 的 12,000 分鐘 Linux 2-core 工作為例,GitHub 收費 $54,Sengi 收費 $11,節省 80%。Sengi 每月提供 3,000 分鐘免費用量,支援 2、4、8 vCPU runner。
I work on Sengi, a hosted runner service for GitHub Actions, and the Sengi rows below are ours. GitHub's figures are its published per-minute rates and included minutes, the ones in effect since January 1, 2026. Every line of arithmetic is on the page.
A GitHub Actions bill has two numbers in it: the minutes and the price per minute. Most advice goes after the minutes: cache more, skip jobs, split suites. All good. But both numbers are also set by the machine your job runs on, and that's the lever this post is about.
How to work out your bill by hand
- Take last month's job-minutes.
- On standard runners in private repositories, subtract your plan's included minutes: 2,000 on GitHub Free, 3,000 on Pro and Team, 50,000 on Enterprise Cloud.
- Multiply what's left by the runner's rate: $0.006 a minute for Linux 2-core, $0.012 for 4-core, $0.022 for 8-core.
Larger runners skip step 2. Included minutes never apply to them, so GitHub bills a 4- or 8-core job from its first minute. Each job is rounded up to a whole minute before the rate applies. Storage is a separate meter; leave it out, because it doesn't move when compute does.
Lever one: the price per minute
Sengi's matched sizes are $0.003, $0.006 and $0.012 a minute for 2, 4 and 8 vCPU, against GitHub's $0.006, $0.012 and $0.022. That's up to half the price for the same vCPU and memory.
Lever two: the minutes themselves
A hosted runner is a slice of a cloud server CPU on network storage. Sengi runs every job in a fresh VM on an AMD Ryzen 9 7950X3D: a desktop CPU boosting past 5 GHz, with DDR5 and local NVMe, on bare metal. Against GitHub's ubuntu-latest at the same size, that gets up to 3× the multi-core CPU, 1.65× the single-core and 15× the random-read disk speed. It's also the same CPU model on every job.
That shows up as fewer minutes:
| Build | GitHub-hosted | Sengi | Faster |
|---|---|---|---|
| Production Docker image (PostHog), 4 vCPU | 14m36s | 7m34s | 1.9× |
| Rust + TypeScript + Docker together, 4 vCPU | 20m43s | 11m28s | 1.8× |
| Node + Docker build (real CI), 2 vCPU | 539 s | 299 s | 1.8× |
Multiply the two levers together and you get the price per build. That Docker image costs $0.175 on GitHub (14m36s at $0.012) and $0.045 on Sengi (7m34s at $0.006): 74% less per build.
Three months, worked by hand
Typical CI throughout: 1.8× faster on 2 vCPU and 1.81× on 4 vCPU, the measured speed-ups above. Sengi includes 3,000 free minutes a month, counted in 2 vCPU minutes, so they cover 1,500 minutes on 4 vCPU.
Under the quota: GitHub Free, 1,500 private minutes
| Line | Minutes | Rate | Cost |
|---|---|---|---|
| GitHub: inside the 2,000 included | 1,500 | — | $0.00 |
| Sengi, 2 vCPU: 1,500 ÷ 1.8, inside the free 3,000 | 834 | $0.003 | $0.00 |
Below the quota, neither side bills compute.
Over the quota: GitHub Team, 12,000 private Linux 2-core minutes
| Line | Minutes | Rate | Cost |
|---|---|---|---|
| GitHub: 12,000 − 3,000 included | 9,000 | $0.006 | $54.00 |
| Sengi, 2 vCPU: 12,000 ÷ 1.8 = 6,667, − 3,000 free | 3,667 | $0.003 | $11.00 |
| You save | $43.00 (80%) |
A larger runner: GitHub Team, 6,000 minutes on Linux 4-core
| Line | Minutes | Rate | Cost |
|---|---|---|---|
| GitHub: no included minutes on larger runners | 6,000 | $0.012 | $72.00 |
| Sengi, 4 vCPU: 6,000 ÷ 1.81 = 3,315, − 1,500 free | 1,815 | $0.006 | $10.89 |
| You save | $61.11 (85%) |
The larger runner is where the gap is widest. GitHub bills every one of those minutes at $0.012, while Sengi finishes the same work in fewer minutes at half the rate.
To run your own numbers, the cost calculator takes your plan, minutes, runner size and job type (typical CI, Docker, Rust or TypeScript). It runs in your browser with no email gate.
Caches come along
actions/cache, the setup-* actions' caches and Docker's type=gha layer cache all work unchanged on Sengi, served from Sengi's own cache and included in the price. With a warm type=gha cache, one measured Docker build step went from 68 s to 36 s.
Switching is one line
Install the Sengi GitHub App, connect the repository, then:
jobs:
test:
- runs-on: ubuntu-latest
+ runs-on: sengi-standard-2-ubuntu-2404
sengi-standard-4-ubuntu-2404 and sengi-standard-8-ubuntu-2404 give you 4 and 8 vCPU. Steps, secrets, triggers and logs stay in GitHub. 2 vCPU runners are pre-booted, so jobs start in about 2 seconds, and boot and teardown are never billed. Runners are Ubuntu 24.04 on x64. If you'd rather not touch the YAML, there's a prompt for your coding agent that finds every eligible job and opens the pull request for you.
3,000 free minutes every month, no card: point your slowest job at sengi.run and compare its run time with last week's.
來源:DEV Community · dev.to