How are GitHub hosted runners billed, and what are you actually paying for?

GitHub-hosted runners are billed per minute of job execution, and each job is rounded up to the next whole minute. A job that runs for 61 seconds is billed as two minutes. A workflow that fans out into twenty short matrix jobs pays the rounding twenty times. This is why many small jobs often cost more than their wall-clock time suggests.

The per-minute rate depends on the operating system. Linux is the baseline. Windows and macOS cost more per minute and draw down included minutes faster through OS multipliers. Each plan includes a monthly allowance of minutes that differs by plan tier. Usage beyond that allowance is billed at the per-minute rate. Larger runners, with more CPU, more memory, or GPUs, are billed at higher per-minute rates and are generally not covered by the included allowance. Rates, multipliers, and allowances change over time, so take current figures from GitHub's own pricing and billing documentation rather than from any article, including this one.

Self-hosted runners are machines you provision and register with GitHub to execute jobs. You pay for the infrastructure and the people who operate it. Check GitHub's current terms for any platform charges on self-hosted usage. Actions Runner Controller (ARC) is a Kubernetes operator that creates and scales runner pods based on queued jobs.

A common comparison divides a VM's hourly price by 60 and sets the result beside GitHub's per-minute rate. That comparison leaves out:

  • idle capacity
  • engineering time
  • caching
  • failed and retried runs

A better unit is total cost per useful CI minute, which the rest of this article uses.

How do self-hosted runners work?

A self-hosted runner is the same open-source runner application that GitHub uses on its hosted machines, installed on a machine you control. You register it with a repository, an organization, or an enterprise using a short-lived registration token. From then on the runner opens an outbound HTTPS connection to GitHub and long-polls for work. GitHub never connects inbound to the runner, so the machine can sit behind a firewall or NAT as long as it can reach GitHub's endpoints.

Jobs reach a runner through labels. Every self-hosted runner carries the self-hosted label plus labels for its operating system and architecture, and you can add custom ones such as gpu or large-linux. A job's runs-on value lists the labels it needs, and GitHub assigns the job to an idle runner that has all of them. At the organization and enterprise level, runner groups restrict which repositories may use which runners, which is how you keep a pool with access to internal networks away from repositories that should not reach it.

When a runner picks up a job, it downloads the job definition, fetches the referenced actions, runs the steps in order, and streams logs and results back to GitHub. Logs, artifacts, and status checks still live in GitHub, so developers see no difference in the pull request UI.

Runners are either persistent or ephemeral. A persistent runner stays registered and takes job after job, keeping whatever files, caches, and tools earlier jobs left behind. An ephemeral runner, configured with the runner's --ephemeral option, takes exactly one job and then deregisters, so the machine or container can be destroyed and replaced. ARC automates the ephemeral pattern on Kubernetes: it watches for queued jobs, creates a fresh runner pod for each one, and removes the pod when the job finishes. The rest of this article assumes ephemeral runners unless it says otherwise.

How do you measure your CI costs before deciding?

Start with the data GitHub already records. Use gh api with --paginate against the workflow runs endpoint for each repository, then fetch the jobs for each run. Each job object includes created_at, started_at, completed_at, and its runner labels, which are the fields you need. The code example below aggregates them per workflow with jq.

Separate waiting from working

Queue time is started_at − created_at. Execution time is completed_at − started_at. Hosted runners bill only execution. Queue time is still a cost, because developers wait on it, and it is the number a self-hosted pool can make worse if you undersize it. Track the two separately.

Apply per-job rounding

Hosted billing rounds each job up to the next whole minute, so a matrix of short jobs costs more than its raw duration suggests. Round each job individually before summing.

Illustrative estimate (assumed numbers, not a benchmark): 10 lint jobs × 20 s = 200 s raw, but 10 × 1 min = 10 billed minutes.

Billed minutes = Σ ceil(job execution seconds / 60)

Find the heavy hitters

Sort billed minutes per workflow. A few workflows usually dominate, often integration suites or release builds. Those are where the fixes in the next section pay off. They are also the only workloads worth considering for self-hosting.

Numbers to carry forward

  • Monthly job count
  • Average billed duration per job
  • Peak concurrency: maximum overlapping jobs, derived from the start and end timestamps. This sets self-hosted capacity.
  • OS mix: from the job labels. Linux, Windows, and macOS are priced and hosted differently.
#!/usr/bin/env bash
set -euo pipefail
REPO="example-org/example-repo"
RANGE="2026-10-01..2026-10-31"

gh api --paginate "repos/$REPO/actions/runs?per_page=100&created=$RANGE" \
  --jq '.workflow_runs[].id' > run_ids.txt

: > jobs.jsonl
while read -r run_id; do
  gh api --paginate "repos/$REPO/actions/runs/$run_id/jobs?per_page=100" \
    | jq -c '.jobs[]' >> jobs.jsonl
done < run_ids.txt

jq -s '
  map(select(.conclusion != "skipped" and .started_at and .completed_at))
  | map({
      wf: .workflow_name,
      queue_s: ((.started_at | fromdateiso8601) - (.created_at | fromdateiso8601)),
      exec_s:  ((.completed_at | fromdateiso8601) - (.started_at | fromdateiso8601))
    })
  | map(.billed_min = ((.exec_s / 60) | ceil))
  | group_by(.wf)
  | map({
      workflow: .[0].wf,
      jobs: length,
      billed_minutes: (map(.billed_min) | add),
      avg_queue_s: ((map(.queue_s) | add) / length | floor)
    })
  | sort_by(-.billed_minutes)' jobs.jsonl

Uses gh api to collect a month of workflow runs and their jobs, then uses jq to separate queue time from execution time, round each job up to a billed minute, and rank workflows by billed minutes.

Which cheaper fixes should you try before migrating to self-hosted runners?

Every one of these fixes cuts billed minutes on hosted runners and occupied capacity on self-hosted ones, so apply them first. They shrink the baseline that any break-even calculation rests on, and they can remove the case for migrating entirely.

Cache dependencies by lockfile hash. Key actions/cache on a hash of package-lock.json, go.sum, or the equivalent. The key then changes only when dependencies change, and a cache hit replaces a full download and resolve. For Docker builds, order the Dockerfile so dependency installation comes before copying source. That way a code-only change reuses the cached layers. BuildKit's GitHub Actions cache backend (type=gha) persists those layers between runs.

Filter by path. A docs-only change shouldn't run the backend suite. Add paths or paths-ignore filters to push and pull_request triggers so unrelated changes skip whole workflows. Be careful when the workflow is a required status check: a skipped workflow never reports a status, so the pull request can block waiting on it.

Cancel superseded runs. If you push three commits to a branch in quick succession, only the last run matters. A concurrency group keyed on the workflow and ref, with cancel-in-progress: true, stops the older runs instead of letting them finish.

Split tests with a matrix. Sharding cuts wall-clock time, which is engineer wait time. It usually adds billed minutes, though, because each shard repeats checkout and setup, and hosted jobs are rounded up to the whole minute.

Right-size machines. A larger runner costs more per minute. It only pays off if the job is CPU-bound and actually finishes proportionally faster. Check this against the job timings you collected above.

The snippet below combines path filters, a concurrency group, and lockfile-keyed caching.

name: backend-ci

on:
  pull_request:
    # Skip this workflow when only docs or markdown change
    paths-ignore:
      - 'docs/**'
      - '**/*.md'
  push:
    branches: [main]
    paths:
      - 'src/**'
      - 'package-lock.json'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      # Key on the lockfile hash so the cache only changes with dependencies
      - uses: actions/cache@v4
        with:
          path: ~/.npm
          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-npm-
      - run: npm ci
      - run: npm test

A workflow that skips docs-only changes with path filters, cancels superseded runs on the same ref, and caches npm downloads keyed on the lockfile hash.

What goes into the total cost of self-hosted GitHub runners?

The per-minute rate you replace is only one line. Hosted runners bundle the machine, the image, patching, and the on-call rotation that keeps the queue moving. Self-hosting unbundles them, and most of the new cost lands in places a compute quote does not show.

Cost category Hosted runners Self-hosted runners Easy to overlook?
Compute (VMs or nodes) Included in per-minute rate You pay, including idle capacity No
Disks, cache volumes, snapshots Included (ephemeral) You pay; caches grow until pruned Yes
Network egress, NAT, registry pulls Included You pay per GB; external registries may rate-limit Yes
Log and artifact storage Billed by GitHub Still billed by GitHub, plus anything you store yourself Yes
Control plane (e.g. Kubernetes for actions runner controller) None Cluster fees, system nodes, add-ons Yes
Observability (metrics, logs, alerts) None Ingest and retention costs Yes
Runner and base image patching GitHub Your engineers, on a recurring schedule Yes
Cluster upgrades None Your engineers Yes
Runner groups, permissions, secrets access Simpler Your design and ongoing review Yes
On-call and incident response GitHub Your rotation Very

The last rows matter most. A broken runner fleet blocks every merge in every repository that targets it. Teams usually run into this when an expired certificate, a full disk, or a bad image rollout leaves jobs queued with no runner to pick them up. Treat reliability work as a fixed monthly cost.

Write that cost as hours per month times a loaded hourly rate. Put it in the same spreadsheet as the cloud bill, so it is weighed alongside compute.

Worked example: where is the break-even point, and how sensitive is it?

Illustrative estimate. Every input below is assumed, not measured.

Assume 100,000 jobs a month at 8 minutes each, which gives 800,000 useful minutes. Peak concurrency is 60 jobs. The hosted rate is $0.008/min, a VM costs $0.10/hour, a month is 730 hours, and engineering time is loaded at $100/hour.

  • Hosted: 800,000 × $0.008 = $6,400, or $0.0080 per useful minute.
  • Static fleet: 60 VMs running all month cost $4,380. Add $200 of cluster overhead and 10 engineer-hours ($1,000) for a total of $5,580, or $0.0070 per useful minute. Utilization is only 30%, because the fleet is sized for peak load.
  • Autoscaled fleet: Boot time and idle tails add 20% to the useful minutes, so you pay for 960,000 minutes ($1,600). Add $300 of overhead and 15 engineer-hours ($1,500) for a total of $3,400, or $0.0043 per useful minute.
Scenario Static $/useful min Autoscaled $/useful min Hosted $/min
Base case 0.0070 0.0043 0.0080
Lower utilization (static 20%, autoscaled 50%) 0.0097 0.0056 0.0080
Labor rises to 40 h/month 0.0107 0.0074 0.0080
Volume halves, labor 40 h 0.0215 0.0128 0.0080
Hosted price cut 25% 0.0070 0.0043 0.0060

Labor dominates because it is fixed. It does not shrink when volume drops, so every lost job raises the cost of the remaining minutes. The static fleet loses its advantage in three cases: one bad assumption, a modest hosted price cut, or a single team moving its builds elsewhere. The autoscaled fleet holds up better, but only while volume stays high and maintenance hours stay low. Recompute this table every quarter, not once at migration time.

How does actions runner controller change the economics through autoscaling?

Bursty load is the reason. CI demand spikes around merges and release cutoffs and falls to almost nothing overnight. A static fleet sized for the peak pays for idle machines the rest of the day, so its cost per useful minute rises as utilization drops.

Actions Runner Controller (ARC) runs one ephemeral runner pod per job on Kubernetes and deletes it after the job, so you pay only while demand exists. The cluster autoscaler then adds or removes nodes to match the pods.

GitHub job queue
      |
      v
ARC controller ---> runner scale set (min..max)
                          |
                          v
        ephemeral runner pods on autoscaled nodes
            |                         |
     cache volume            internal artifact registry

The settings trade cost against wait time:

  • Scale to zero removes idle cost. The first job then waits for a node to provision, a pod to schedule and an image to pull.
  • Warm pools set a minimum runner count. They remove that cold-start wait, and you pay for the idle runners.
  • Spot or preemptible nodes cost less, but the provider can reclaim them mid-job. Every rerun spends compute and developer time, which reduces the savings. They suit short, idempotent jobs.

ARC also saves money indirectly:

  • Warm dependency and Docker layer caches on persistent volumes shorten jobs.
  • Runners placed near internal registries pull artifacts faster.
  • Faster hardware finishes the same work sooner.

Shorter jobs reduce billed compute and the time developers spend waiting, so they lower cost and speed up feedback together.

+-------------------+
| GitHub job queue  |
| (queued jobs)     |
+---------+---------+
          |  job demand
          v
+-------------------+      +------------------------------+
| ARC controller    |----->| runner scale set             |
| (watches queue)   |      | min = warm pool, max = cap   |
+-------------------+      +--------------+---------------+
                                          | create / delete pods
                                          v
+-----------------------------------------------------------------+
| Kubernetes cluster (cluster autoscaler adds/removes nodes)      |
|                                                                 |
|  +-- on-demand node ----------+   +-- spot node -------------+  |
|  | [runner pod] [runner pod]  |   | [runner pod] (may be     |  |
|  | ephemeral: 1 job, deleted  |   |  reclaimed -> retry)     |  |
|  +-------------+--------------+   +------------+-------------+  |
|                |                               |                |
+----------------+-------------------------------+----------------+
                 |                               |
                 +---------------+---------------+
                 |                               |
                 v                               v
        +------------------+          +---------------------------+
        | cache volume     |          | internal artifact registry|
        | deps + layers    |          | (same network, fast pull) |
        +------------------+          +---------------------------+

ARC watches the GitHub job queue and sizes a runner scale set between a warm-pool minimum and a cap, creating one ephemeral pod per job on autoscaled on-demand or spot nodes that share a nearby cache volume and internal artifact registry.

How can self-hosted runners save engineering time?

The cloud bill is the visible part of CI cost. Engineers waiting on CI is usually larger, and self-hosting can reduce it in a few concrete ways:

  • Shorter jobs from warm caches. Dependency caches and Docker layers on a nearby volume avoid repeated downloads and rebuilds. Every minute removed from a job on the critical path of a pull request is a minute the author is not waiting.
  • Prebuilt runner images. Baking compilers, SDKs, and CLI tools into the runner image removes setup steps that every job would otherwise repeat. The same image also gives developers one known environment to reproduce failures in, instead of guessing what a hosted image had installed that day.
  • Direct access to internal systems. Runners inside your network can reach private registries, test databases, and internal services without tunnels, IP allowlists for hosted runner ranges, or extra credentials. That removes a recurring source of brittle workflow configuration and the time spent debugging it.
  • Hardware matched to the workload. CPU-heavy builds and large test suites can run on machines sized for them, which shortens feedback without paying the larger-runner rate per minute.
  • Less queueing at peak, if sized correctly. A pool with headroom, or an ARC scale set with a high enough maximum, keeps jobs from waiting during merge rushes.

The time cuts both ways. Someone has to build images, patch them, upgrade the cluster, and answer when runners stop picking up jobs. That time is already in the cost table above, and it has to be netted against the waiting time saved.

Illustrative estimate. Every input below is assumed, not measured. Assume 50 engineers, each waiting on 6 CI runs a day, and warm caches plus prebuilt images remove 2 minutes from each run's critical path. That is 50 × 6 × 2 = 600 minutes, or 10 engineer-hours, a day. Not all waiting is lost time, because people switch to other work, so assume only a quarter of it is recovered as productive time: 2.5 hours a day, or roughly 50 hours over an assumed 20 working days. Compare that with the 15 to 40 maintenance hours per month used in the worked example. With these assumptions the time saved exceeds the time spent. With fewer engineers, faster existing builds, or higher maintenance hours, it does not. Measure your own queue and execution times with the script above before and after a pilot rather than relying on this arithmetic.

Who should use self-hosted runners?

Self-hosted runners fit organizations where most of the following are true:

  • High, sustained Linux CI volume from private repositories. The fixed cost of running a fleet only spreads thin enough when the pool stays busy, as the sensitivity table shows.
  • A platform or infrastructure team that already operates Kubernetes or a VM fleet. ARC, image pipelines, and on-call fit into work that team already does. Standing up a cluster only for CI moves most of the cost into labor.
  • Builds that need the network or hardware you control. Jobs that must reach internal services, use specific CPU architectures, or run on hardware that hosted runners do not offer at a reasonable rate are natural candidates.
  • Policy requirements on where code and artifacts are processed. If your organization requires builds to run inside its own network or accounts, self-hosting may be required regardless of cost.

They are usually a poor fit for small teams with modest CI usage, for organizations without anyone to own the fleet, and for public repositories that accept contributions from forks. For those, the cheaper fixes earlier in this article and a hosted-only setup are the better use of engineering time. Many organizations sit in between and run a hybrid, which the next section covers.

When should you avoid self-hosted runners, and what are the alternatives?

Self-hosted runners execute whatever a workflow tells them to run, on your hardware and inside your network. On a public repository, a pull request from a fork can change that workflow. A persistent runner then lets it read cached credentials, leave processes running for later jobs, or probe internal services. Avoid self-hosting for public repositories and untrusted contributors unless every job runs in a fresh, isolated environment with no route to sensitive networks.

Ephemeral runners take one job and are then destroyed. This closes the cross-job attack path and removes shared state, which causes non-hermetic, order-dependent builds. In exchange, you pay startup time on every job and lose warm local caches. Persistent runners keep the cache and start instantly, but leftover files, toolchains and Docker layers accumulate. Builds then pass or fail depending on which job ran before.

macOS needs Apple hardware, and GPU nodes are expensive to leave idle, so both are hard to self-host profitably. Most savings come from Linux.

Option Security Startup Cache Ops burden
Hosted Isolated per job Fast Remote only None
Ephemeral self-hosted Strong if network-isolated Slower Lost per job Medium
Persistent self-hosted Weak for untrusted code Instant Warm High (drift)
Hybrid Hosted for untrusted work Mixed Mixed Medium

If self-hosting doesn't fit, there are three alternatives:

  • Stay fully hosted. Apply the fixes from earlier sections and accept the remaining bill.
  • Use larger hosted runners. Pay a higher per-minute rate for jobs that finish faster.
  • Run a hybrid. Keep public, low-volume, macOS and Windows jobs on hosted runners. Route heavy private Linux builds to self-hosted pools using labels and runner groups.

Self-hosting is worth it when three conditions hold together:

  • Linux CI volume is high and sustained.
  • Builds come from private repositories.
  • A platform team already runs Kubernetes or a VM fleet and can absorb the maintenance.

How OneEnv can help

Disclosure: OneEnv is the product behind this blog.

OneEnv (oneenv.io) is a workspace-based governance platform for the things services share — environment variables, database structure, API routes and validation rules. A change to a shared value is staged on a branch, reviewed once, and then every affected service explicitly approves or rejects it before it goes live, so you can see who a change touches before it ships instead of finding out in production.

Applied to self-hosted github runners cost, this is where it helps:

Saves time

  • Every service that inherits a shared value is listed in one place, so nobody searches repos and chats to find out who is affected.
  • One review per branch replaces coordinating each team separately; each service still keeps its own approve/reject.
  • Reviewers see the exact diff and the list of affected services up front, so approval is a decision rather than an investigation.

Saves cost

  • Fewer production incidents and rollbacks caused by a shared value, route or column changing under a consumer unannounced.
  • Less duplicated configuration to maintain: one shared definition inherited by many services.
  • Per-service approve/reject means a bad shared value can be refused where it would break something, before it is live.
  • OneEnv has a free plan (1 workspace, unlimited services and members, full governance), so trying it costs nothing.

These are qualitative benefits, not measured results — how much you save depends on how many services share the value.

Want to try it? Start at oneenv.io.