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.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
GitHub Actions: concepts and how it works
Discover GitHub Actions: events, workflows, jobs, steps and actions, the Marketplace, hosted runn...
End-to-end CI/CD (5/5): GitHub Actions, GitLab CI, Jenkins and Argo CD in practice
Compare and use CI/CD tools: GitHub Actions, GitLab CI, Jenkins, Argo CD and Flux; a complete pip...
Delivering with GitHub Actions: GHCR, environments, OIDC and attestations
Building and deploying with GitHub Actions: publishing an image to GitHub Container Registry with...
GitLab runners: types, executors, installation and security
Running GitLab jobs: instance, group and project runners, docker, kubernetes and docker-autoscale...
Writing GitHub Actions workflows
Mastering workflow syntax: triggers and filters, jobs and needs, matrices, if conditions, context...
Reusing and securing GitHub Actions workflows
Industrializing GitHub Actions: reusable workflows, composite, JavaScript and Docker actions, lea...
GitHub Actions best practices and troubleshooting
Running GitHub Actions: speeding up and cutting costs, debugging (debug logs, act locally, gh run...
End-to-end CI/CD (1/5): principles and anatomy of a pipeline
Understand end-to-end CI/CD: continuous integration, continuous delivery and continuous deploymen...
GitLab CI/CD: concepts and architecture
Discover GitLab CI/CD: the DevSecOps platform, the .gitlab-ci.yml file, pipelines, stages and job...