CI/CDGitHub Actions
GitHub Actions minutes: where they go and how to cut them
GitHub bills each job on a GitHub-hosted runner by the minute, at a rate set by the runner type. That leaves three things to reduce: the number of jobs, their length and the rate.

How runner time is billed
Standard GitHub-hosted runners are free in public repositories, and self-hosted runners are free to use. The rest of this guide is about GitHub-hosted runners in private repositories.
Each plan includes a monthly amount of compute usage. GitHub's billing page expresses it as a monetary amount and not as a number of minutes: 12 USD for GitHub Free, 18 USD for Pro and for Team, and 300 USD for Enterprise Cloud, as read in November 2026. Every job draws from that amount at the per-minute rate of its runner. The runner pricing page lists:
- Linux 1-core (
ubuntu-slim): 0.002 USD - Linux 2-core: 0.006 USD on x64, 0.005 USD on arm64
- Windows 2-core: 0.010 USD
- macOS 3-core or 4-core: 0.062 USD
The same pages give four rules. GitHub rounds each job up to the next whole minute. Usage is charged to the repository owner. A failed run is billed, and its re-run is billed again. With no valid payment method on file, usage is blocked once the included amount is consumed.
Runs that do not need to happen
Two settings stop work before it is billed:
on:
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: trueWith paths-ignore, the workflow does not run when all changed paths match the patterns. The two patterns are a choice for this example. The concurrency block cancels the in-progress run of a pull request when a new one starts.
Keep path filters off a workflow that is a required status check: when it is skipped, its checks stay pending and the pull request is blocked.
A timeout on every job
timeout-minutes is the maximum number of minutes a job runs before GitHub cancels it. The default is 360, and the limits page gives 6 hours as the execution limit of a job on a GitHub-hosted runner. Set a lower limit on every job, chosen from the job's own run times. The 15 below is only a value for the example:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15Shorter jobs and smaller matrices
Jobs on GitHub-hosted runners start in a clean image and download their dependencies each time. A cache keeps them between runs, and the setup actions enable one with a single input, such as cache: npm on actions/setup-node.
A matrix runs one job for each combination, and each job is rounded up on its own. Three things to review:
- The operating systems. At the rates above, one macOS minute costs as much as 10.3 Linux 2-core minutes (0.062 / 0.006). Run macOS and Windows jobs only where the code depends on the platform.
fail-fast. It defaults totrueand cancels the matrix jobs still in progress or queued when one fails. Leave it on.- Very short jobs. Six jobs of ten seconds are billed as six minutes. Make them six steps of one job.
A re-run is billed again, so after a failure re-run the failed jobs and not all jobs.
The right runner for the job
ubuntu-slimis the 1-core Linux runner, at one third of the 2-core rate. GitHub describes it as optimized for automation tasks, issue operations and short-running jobs. It runs jobs in an unprivileged container, where Docker-in-Docker is not supported, and its job timeout is 15 minutes.- Larger runners are available on GitHub Team and GitHub Enterprise Cloud. A 4-core Linux runner costs 0.012 USD per minute, twice the 2-core rate, so a job has to finish in less than half the time to cost less. Larger runners are billed in public repositories too.
- Self-hosted runners are free to use with GitHub Actions. You are responsible for the cost of maintaining the machines.
Artifact retention
Storage is billed apart from compute. Artifacts share one storage allowance with GitHub Packages, and the charge accrues by the hour. Deleting an artifact stops future charges but does not remove what has already accrued in the billing cycle.
Artifacts and logs are retained for 90 days by default. Lower the retention period in the repository's Actions settings, and set retention-days on artifacts you need only for a short time. Replace the name, the path and the number of days with yours:
- uses: actions/upload-artifact@v7
with:
name: test-report
path: reports/
retention-days: 5Where to look first
- The billing usage view. Open Billing and Licensing for the account, then the metered usage view, and filter the data to Actions. "Get usage report" sends a report by email.
- Actions usage metrics. Under Insights, for an organization or a repository, this view shows minutes by workflow, job, repository and runner type. GitHub's billing and usage page notes that these metrics do not apply minute multipliers.
- The run itself. On a run's page, Usage under "Run details" shows the billable time of each job.
- Alerts and budgets. GitHub can email you when included usage reaches 90% and 100%, and a budget can stop usage at the amount you set.
Start with the workflows that use the most minutes. Check each for a timeout, a path filter and its runner type.
Sources
Want a second pair of eyes on yours? We do this work for a living.
More guides

Caching in GitHub Actions: what to cache and when it hurts
CI/CD · 4 min read
Keys, restore keys, branch scope, the storage limit, and the cases where a cache slows the build.

Concurrency groups: stop two deploys from running at once
CI/CD · 4 min read
One run per group at a time: cancel outdated pull request runs and never cancel a deploy.

Matrix builds in GitHub Actions
CI/CD · 3 min read
One job definition, many combinations: the syntax, the limits and the bill.