A self-hosted runner has labels 'self-hosted', 'linux', 'x64', and 'gpu-a100'. Which runs-on value targets only runners that have the gpu-a100 label (among matching hosts)?
Select an answer to reveal the explanation.
Short Explanation and Infographic
runs-on with a label (or array of labels) requires the runner to have all listed labels. A single custom label gpu-a100 selects runners carrying that label.
Full explanation below image
Full Explanation
Self-hosted targeting uses label matching: when runs-on is an array, the runner must include every listed label (AND semantics). A single custom label is enough if it uniquely identifies the pool. Including windows in the array would require a Windows label the Linux GPU runner lacks. ubuntu-latest selects GitHub-hosted images, not your self-hosted GPU box. runs-on.group targets runner groups by group name/configuration, not arbitrary label strings in that form. Prefer explicit label sets like [self-hosted, linux, gpu-a100] in production for clarity.