Interview Prep/GitHub Actions/Workflow Anatomy & Execution Model

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.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflow Anatomy & Execution Model