Using labels
GitHub Actions matches your workflow with your runners by searching for the correct labels. The labels are applied when you register a runner. You can also pass them to the config
script as an argument:
$ ./config.sh --labels self-hosted,x64,linux
You can later modify the labels and create new labels in the details of the runner by pressing the gear icon next to Labels (see Figure 7.4):
If your workflows have specific demands, you can create custom labels for them. An example of a custom label could be adding a tag for a tool such as matLab
or necessary gpu
access.
All self-hosted runners have the self-hosted
tag by default.
To use the runners in your workflows, you specify the demands in the form of tags:
runs-on: [self-hosted, linux, X64, matlab, gpu]
This way, your workflow finds the corresponding runner that fulfills the necessary demands.