When creating a new self-hosted runner for GitHub (enterprise), some default labels (Windows, X64, self-hosted) are automatically added. I can also add custom labels with the --labels parameter.
The thing is that I would like to reserve this runner for some specific workflows, but without restricting the repositories where it can be called. Because some projects use this default labels to choose runner, I would like to remove them.
I tried to find where this labels are created, but I'm fearing they are created server-side and that I would not have control over them...
Did anybody deal with a similar situation?
Thank you.
The support for not adding default labels to self-hosted runners, was added in this PR:
https://github.com/actions/runner/pull/2443
It should become available in the next stable release that includes this change.
To use it, pass in:
--no-default-labels
to the config.sh
script, when configuring the self hosted runner. Opting out of the default labels makes the --labels
option, mandatory.
You cannot remove the default labels. If this runner is meant to be used exclusively by specific repos, then move them into a Runner Group and only allow that groups to be used by those repos.
No other way to configure that at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With