Runners
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
A runner is the machine that picks up a job, runs its steps and reports the result. runs-on selects one by label. For
most repositories the answer is a standard GitHub-hosted Linux runner, but the choice matters for cost, speed, hardware
(ARM, macOS), network access and security. This page describes the options and how to pick between them. Version
numbers below were verified on 2026-11-10; GitHub’s runner-images documentation wins on any discrepancy, because labels
and image contents change.
GitHub-hosted runners
Each job runs on a fresh virtual machine that GitHub provisions from a maintained image and discards afterwards. Nothing
persists between jobs, and sudo is available without a password.
| Label | Operating system | Notes |
|---|---|---|
|
Currently Ubuntu 24.04 (the same image as |
The default choice for builds, tests and deployments. "Latest" is a moving alias that GitHub advances to the next Ubuntu LTS after a migration period. |
|
Explicit Ubuntu releases |
Pin one to avoid surprises when the alias moves. |
|
Ubuntu on ARM64 |
For native ARM builds and tests instead of emulating with QEMU. |
|
A lightweight Linux container-based runner |
A smaller, cheaper option for short, light jobs such as labelling, linting or notifications. |
|
Currently Windows Server 2025 ( |
Also |
|
Currently macOS 26 on Apple silicon ( |
Also |
Notes on the table:
-
The
*-latestlabels trail the newest operating system on purpose. A pipeline that must not change underneath you should use an explicit label such asubuntu-24.04, and update it deliberately. -
Hosted macOS runners are the usual way to build and sign iOS and macOS apps in Actions. Xcode previews are published under their own labels; check the image readme.
-
Standard runners have a fixed hardware profile per OS and visibility (public repositories get a different, free profile than private ones). Check the current specifications table in the docs instead of assuming core counts.
-
Jobs on hosted runners have a maximum execution time, and macOS and Windows minutes cost more than Linux minutes on private repositories.
What is in an image
Hosted images ship with a large preinstalled toolset so that most jobs need no installation step. For Ubuntu 24.04 the
image published on 2026-11-01 contained, among much else, Node.js 22.23, Python 3.12.3, Gradle 9.8, Maven 3.10, Docker
28.0.4 with Buildx 0.38 and Compose 2.38, plus the GitHub CLI, git, jq, curl and common compilers and cloud CLIs.
Image contents change weekly, so treat those numbers as an example and read the source of truth:
# The readme for each image lists every preinstalled tool and version:
# https://github.com/actions/runner-images -> images/ubuntu/Ubuntu2404-Readme.md
# Print what a running job actually has:
echo "Image: $ImageOS $ImageVersion"
cat /etc/os-release
node --version && java -version && docker --version
How to read the readme: the top shows the image version and the OS; sections list installed languages and runtimes (with
the versions available in the tool cache), package managers, tools, browsers and databases. The "Installed Software"
tables are what setup-* actions can reuse, and the release notes of the repository tell you which tools were updated
or removed in each weekly image. Pin an exact tool version with a setup-* action when you need reproducibility; do not
rely on the image’s default Node or Java.
Larger runners
Larger runners are GitHub-hosted machines with more cores, memory and disk, optional GPUs and ARM or Windows variants. They are paid in every case (they are billed per minute even for public repositories) and are configured by an organization or enterprise owner, not selected by a built-in label:
-
You create a runner, choose OS, image and size, and assign it to a runner group that controls which repositories and workflows may use it.
-
Your workflow targets it by the name you gave it, or by a group and labels.
-
They can have static IP addresses, which is useful when a firewall allow-list or a database accepts only known addresses.
-
Autoscaling settings define the maximum number of concurrent machines, so a burst of jobs cannot exceed a budget.
-
Some also offer private networking, attaching the runner to an Azure virtual network.
jobs:
build:
runs-on: ubuntu-latest-8-cores # the name chosen when the larger runner was created
Use them when a job is bound by compilation or test parallelism, and compare cost against the saved time: a job that runs in a third of the time on a machine with four times the price per minute can still be the cheaper choice.
Self-hosted runners
A self-hosted runner is the open source actions/runner application (2.338.x at the time of writing) that you install on
your own machine, VM or container. It polls GitHub over HTTPS for jobs, so it needs outbound access only.
Installing one
In Settings → Actions → Runners → New self-hosted runner (repository, organization or enterprise level), GitHub shows the download and a short-lived registration token:
mkdir actions-runner && cd actions-runner
curl -o runner.tar.gz -L https://github.com/actions/runner/releases/download/v2.338.0/actions-runner-linux-x64-2.338.0.tar.gz
tar xzf runner.tar.gz
./config.sh --url https://github.com/albertoirurueta/docs --token <REGISTRATION_TOKEN> \
--labels docs-builder,linux --name docs-runner-1 --work _work
./run.sh # foreground; or install as a service:
sudo ./svc.sh install && sudo ./svc.sh start
Prefer the exact download command shown on the settings page (it includes the current version and checksum). Runners update themselves automatically unless disabled.
Labels and groups
Every self-hosted runner automatically has self-hosted, an OS label (linux, windows, macOS) and an architecture
label (x64, ARM64); you add custom ones such as gpu or docs-builder. A job matches only if the runner has all
labels listed. Organization and enterprise runners can be placed into runner groups that limit which repositories may
use them.
Ephemeral and just-in-time runners
A persistent runner keeps its workspace, caches and any leaked state between jobs, so jobs can affect each other. An
ephemeral runner (config.sh --ephemeral) takes exactly one job and then unregisters. Just-in-time (JIT) runners
go further: a REST call returns a one-use configuration, the runner starts with ./run.sh --jitconfig <config>, and
there is no long-lived registration token on the machine. Both are the right model for autoscaled fleets.
Security
-
Never attach self-hosted runners to public repositories that accept pull requests from forks. A fork’s workflow can run arbitrary code on your machine and reach whatever the machine can reach. Restrict a runner group to selected private repositories.
-
Treat a persistent runner as shared infrastructure: run it in a disposable VM or container, with no cloud credentials on disk, minimal network access and a non-administrative user.
-
Use ephemeral or JIT runners and rebuild images regularly.
-
Secrets are still delivered to jobs, so the host operator must be trusted with every secret those workflows can read.
See Security Hardening for the wider picture.
Actions Runner Controller
actions-runner-controller (ARC) is GitHub’s supported Kubernetes operator for self-hosted runners. You install it with Helm, create a runner scale set in a namespace, and ARC starts one ephemeral runner pod per queued job, scaling between a minimum and maximum. Workflows select the scale set by its installation name:
jobs:
build:
runs-on: arc-runner-set # the name given to the runner scale set
It suits teams that already operate Kubernetes and want autoscaled, container-isolated runners close to their own network; the operational burden (upgrades, node pools, image caching) is yours.
The forms of runs-on
runs-on: ubuntu-latest # a single label
runs-on: [self-hosted, linux, x64, gpu] # a list: the runner must have ALL labels
runs-on: # a runner group, optionally with labels
group: ubuntu-runners
labels: ubuntu-20.04-16core
runs-on: ${{ matrix.os }} # computed, typically from a matrix
A job that no runner can serve stays queued until one appears, rather than failing; a typo in a label therefore looks like a job that never starts.
Choosing a runner
For this site’s publish.yml, a standard ubuntu-latest runner is plenty: it needs Node.js 24, network access to clone
the aggregated repositories and a few minutes of CPU. Switching to ubuntu-24.04 would make a runner-image migration a
planned change instead of an overnight one.
Software already on the runner: the tool cache
Hosted images keep several versions of Node, Python, Java, Go and others in a tool cache directory (the path is
RUNNER_TOOL_CACHE, also runner.tool_cache). The setup-* actions look there first, so a request for a version that is
preinstalled costs seconds, while a version that is not preinstalled is downloaded each time. Combine this with the
package-manager cache option of the same actions:
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm # caches ~/.npm keyed on package-lock.json
The cache: inputs of setup-node, setup-java, setup-python and setup-dotnet use actions/cache internally; see
Caching and Artifacts. Self-hosted runners have no
preloaded tool cache beyond what you install, which is another reason to bake toolchains into their image.
Cost and performance tips
-
Prefer Linux: it is the cheapest hosted OS by a wide margin, and macOS is the most expensive. Run only the jobs that truly need macOS or Windows on those runners.
-
Cancel superseded runs with
concurrencyandcancel-in-progress: truefor pull-request CI. -
Cache dependencies and build outputs, and skip unaffected work with
pathsfilters. -
Set
timeout-minutesso a hung job cannot consume hours. -
Run independent jobs in parallel; one big job on a bigger runner is not always faster than several on standard runners.
-
Use
ubuntu-slimfor jobs that only call APIs or run a linter. -
Free minutes on public repositories apply to standard runners only; larger runners always cost.
-
Review Settings → Billing usage by workflow and runner type.
Common mistakes
-
Using
ubuntu-latestand being surprised when an overnight image migration changes the default compiler or Node version. -
Assuming the image has the exact tool version you need, instead of installing it with a
setup-*action. -
Attaching a persistent self-hosted runner to a public repository.
-
A mistyped self-hosted label, which leaves the job queued forever.
-
Treating a self-hosted runner’s workspace as clean: delete leftovers or use ephemeral runners.
-
Selecting a larger runner label in a repository that is not in the runner group’s allow-list.