What a pull request costs in GitHub Actions minutes
A pull request is rarely one CI run. Every push to its branch starts the workflow again, and every run is several jobs. This page multiplies that out for four sizes of pull request, prices each one on the standard runners, and then spreads a month of pull requests over a GitHub Team allowance with this site's calculator.
The formula in words
Count the runs of a pull request: one for the first push, plus one for every later push while it is open. Multiply the runs by the jobs in each run, and the result by the billed minutes per job, each job rounded up to a whole minute. Those are the minutes of the pull request. Multiply them by the per-minute rate of the runner to get its cost once the plan's included minutes are used up. Inside the included minutes, and in a public repository on standard runners, the pull request costs $0.00.
Four pull requests, priced
| Pull request | Jobs | Minutes | Linux 2-core x64 | Linux 2-core arm64 | Windows 2-core | macOS |
|---|---|---|---|---|---|---|
| 3 runs of 2 jobs, 5 minutes each | 6 | 30 | $0.18 | $0.15 | $0.30 | $1.86 |
| 5 runs of 4 jobs, 5 minutes each | 20 | 100 | $0.60 | $0.50 | $1.00 | $6.20 |
| 5 runs of 6 jobs, 10 minutes each | 30 | 300 | $1.80 | $1.50 | $3.00 | $18.60 |
| 10 runs of 9 jobs, 10 minutes each | 90 | 900 | $5.40 | $4.50 | $9.00 | $55.80 |
A small pull request with a lint job and a test job, pushed three times, is 30 minutes and $0.18 on Linux 2-core x64. A typical one, five pushes with four jobs each, is 100 minutes: $0.60 on Linux and $6.20 if those jobs run on macOS. The long-lived pull request at the bottom, ten pushes against a nine-job pipeline, uses 900 minutes and costs $5.40 on Linux or $55.80 on macOS.
The number of pushes is the multiplier people forget. Halving the minutes per job and halving the pushes that trigger CI have the same effect on the bill.
Short jobs are rounded up on every push
Take the five-push pull request with four jobs, and suppose each job really takes 40 seconds. Each of the 20 jobs is billed as a whole minute, so about 13 minutes of work are billed as 20 minutes, $0.12 on Linux 2-core x64. Folding the four checks into one job would bill 3 minutes per run instead of 4.
A month of pull requests on GitHub Team
The per-request prices above apply to minutes beyond the plan's allowance. GitHub Team includes 3,000 minutes a month, so the first pull requests of the month are covered. With the 100-minute pull request on Linux 2-core x64:
| Pull requests per month | Minutes per month | Minutes billed | Cost per month | Average per pull request |
|---|---|---|---|---|
| 20 pull requests | 2,000 | 0 | $0.00 | $0.00 |
| 30 pull requests | 3,000 | 0 | $0.00 | $0.00 |
| 40 pull requests | 4,000 | 1,000 | $6.00 | $0.15 |
| 60 pull requests | 6,000 | 3,000 | $18.00 | $0.30 |
| 100 pull requests | 10,000 | 7,000 | $42.00 | $0.42 |
Thirty pull requests of this size use the allowance exactly. After that each one adds its full $0.60, and the average per pull request climbs towards that figure as the allowance is spread over more of them: $0.15 at 40 a month, $0.42 at 100. The average only counts pull-request runs; runs on the main branch after a merge, scheduled workflows and release builds draw on the same 3,000 minutes.
To reproduce a row in the calculator, enter 20 as jobs per day (the jobs of one pull request), 5 minutes per job, and the number of pull requests in the working-days field. The calculator multiplies the three, which is all the formula needs.
Making a pull request cheaper
Dropping one job from the four-job pipeline, for example by running a slow check only on the main branch, takes the five-push pull request from 100 minutes to 75 and from $0.60 to $0.45 on Linux 2-core x64, a saving of $0.15 per pull request. Other levers change the number of runs instead of their size: cancel a run when a newer push replaces it, skip the workflow when only documentation changed, and keep the macOS and Windows jobs for the pushes that need them.
All figures are compute only, for standard GitHub-hosted runners; seats, storage and taxes are left out.
Price your own pull requests. Multiply your pushes per pull request by your jobs per push, then enter the result with your average job length in the free calculator.