What are GitHub Actions runners and how to choose one
GitHub-hosted runners, self-hosted runners, ubuntu-latest, windows-latest, macos-latest, runner specs, runner selection strategy
What is a Runner?
A runner is a virtual machine that executes your workflow jobs. GitHub provides hosted runners so you do not need to manage infrastructure. Each job gets a fresh VM โ nothing persists between runs unless you explicitly cache it.
Available Hosted Runners
jobs:
linux-job:
runs-on: ubuntu-latest # Most common, fastest startup
windows-job:
runs-on: windows-latest # For .NET, Windows-specific tests
mac-job:
runs-on: macos-latest # Required for iOS/macOS buildsubuntu-latest maps to the most recent Ubuntu LTS. It is the default choice for most web, backend, and containerized workloads because it is cheapest, starts fastest, and has the broadest tool pre-installation.
windows-latest is required when your tests or build scripts depend on Windows-specific APIs or .exe tooling. It consumes 2ร the free tier minutes of Linux runners.
macos-latest is required for Xcode, Swift, and notarization steps. It consumes 10ร the free tier minutes of Linux runners.
Self-Hosted Runners
You can register your own machines as runners using the GitHub Actions runner agent. Self-hosted runners are useful when you need custom hardware, specific software not available on hosted runners, or you want to avoid per-minute billing. The runner agent polls GitHub for queued jobs and executes them locally.
