1. Hosted runners #
A fresh machine per job.
Overview #
runs-on: ubuntu-latest (or windows-latest, macos-latest) gives a fresh virtual machine, destroyed after the job, with many preinstalled tools. Pin a version (ubuntu-24.04) to avoid surprises when latest changes.
2. Self-hosted runners #
Your machines, your network.
Installation #
mkdir -p ~/actions-runner && cd ~/actions-runner
curl -sLO https://github.com/actions/runner/releases/download/v2.338.2/actions-runner-linux-x64-2.338.2.tar.gz
tar xzf actions-runner-linux-x64-2.338.2.tar.gz
./config.sh --url https://github.com/<organization>/<repo> --token <token> --labels local,docker --unattended
sudo ./svc.sh install && sudo ./svc.sh start- The token comes from Settings › Actions › Runners › New self-hosted runner; it expires after one hour.
- Labels (
runs-on: [self-hosted, linux, docker]) and runner groups control which repositories and workflows can use them. - The
--ephemeraloption makes the runner handle a single job, then unregister: nothing carries over from one job to the next. - Actions Runner Controller (ARC) creates ephemeral on-demand runners on Kubernetes, from autoscaling runner scale sets.
Watch out : Never use a self-hosted runner on a public repository: any pull request from a fork could run code on your machine.
Commands to know #
Commands to know
./config.sh --url … --token … --labels local: register a runner./run.sh: run the runner in the foregroundsudo ./svc.sh status: service status./config.sh remove --token …: unregister the runner
Sources #
Checked in November 2026: CI/CD platforms change every month, check versions and plans in the vendor's documentation.
