How does `runs-on` select a runner when you give multiple labels?
IntermediateConceptWorkflow Anatomy & Execution Model
Answer
An array means AND: the runner must have all labels.
runs-on: [self-hosted, linux, arm64, gpu]
You can also target a group, optionally with labels:
runs-on:
group: prod-runners
labels: [linux, x64]
For ARC scale sets, runs-on is the scale set installation name (for example arc-runner-set), and it must match exactly; ARC scale sets do not use extra custom labels the way classic runners do.
More on Workflow Anatomy & Execution Model
Define workflow, run, job, step, action and runner in one line each.BeginnerWhat is the minimum valid workflow file?BeginnerWhere must workflow files live, and does the file extension matter?BeginnerWhich version of the workflow file does GitHub use for a given run?IntermediateWhat does a GitHub-hosted runner give you at the start of a job?BeginnerShould you use `ubuntu-latest` or `ubuntu-24.04`?Beginner