liveBook · Manning

Runs-on

As explained in GitHub Actions in Action: Continuous integration and delivery for DevOps

runs-on is a GitHub Actions job configuration key that selects the runner or runner group on which a job executes.

runs-on is a job-level GitHub Actions key that chooses where the job executes. A basic workflow can target the latest Ubuntu machine hosted by GitHub. section 2.2

The value can target standard GitHub-hosted runners, an enterprise runner group, or a self-hosted machine. Select larger hosted runners for demanding builds; choose self-hosted runners when hardware, operating-system, software, or local-network control matters. section 12.3.4

Run on an enterprise runner group

jobs: build: runs-on: group: contoso-runners steps: - uses: actions/checkout@v3

Runner choice affects execution speed, pricing, and maintenance. Larger hosted runners may finish faster even though their minutes cost more; self-hosted runners avoid runner charges but require security hardening, patching, and operational management. section 12.3.4

Listing 2.1 The first step outputting Hello World to the console
jobs:
  MyFirstJob:
    runs-on: ubuntu-latest
    
    steps:
      - run: echo "👋 Hello World!"

Shows runs-on selecting ubuntu-latest in a minimal job that prints a message. section 2.2

How GitHub Actions in Action: Continuous integration and delivery for DevOps covers it

How deep it goes
Explains scalar and group-based selection plus operational trade-offs, but defers self-hosted setup details.
Examples
Uses ubuntu-latest for a Hello World job and contoso-runners for an enterprise runner-group job.
What it assumes
Assumes basic workflow and job YAML structure while demonstrating the key from a simple job.
What you can do after
Configure a GitHub Actions job to run on standard, larger, grouped, or self-hosted infrastructure.
How it connects
Connects jobs with GitHub-hosted runners, larger runners, runner groups, and self-hosted runners.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of GitHub Actions in Action: Continuous integration and delivery for DevOps. The section links point to the parts of the book it draws on.