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
