GH-200 · Question #30
You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools. Which syntax could you use in the workflow to target that runner?
The correct answer is A. runs-on: [self-hosted, windows, x64]. Self-hosted runners are targeted using labels in the runs-on: key as an array. The syntax runs-on: [self-hosted, windows, x64] uses the three default labels automatically assigned to Windows x64 self-hosted runners, precisely targeting that runner. Options B and D use an…
Question
You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools. Which syntax could you use in the workflow to target that runner?
Options
- Aruns-on: [self-hosted, windows, x64]
- Bself-hosted: [windows-x64]
- Cruns-on: windows-latest
- Dself-hosted: [windows, x64]
How the community answered
(51 responses)- A90% (46)
- B2% (1)
- C2% (1)
- D6% (3)
Explanation
Self-hosted runners are targeted using labels in the runs-on: key as an array. The syntax runs-on: [self-hosted, windows, x64] uses the three default labels automatically assigned to Windows x64 self-hosted runners, precisely targeting that runner. Options B and D use an invalid self-hosted: key that does not exist in GitHub Actions syntax. Option C (windows-latest) targets GitHub-hosted runners, not your custom self-hosted runner with its specific tooling.
Topics
Community Discussion
No community discussion yet for this question.