Script Valley
CI/CD with GitHub Actions
GitHub Actions FundamentalsLesson 1.4

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?

Runners executing jobs diagram

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 builds

ubuntu-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.

Up next

How to use pre-built GitHub Actions from the marketplace

Sign in to track progress