Priority for self-hosted runners

Hi,

I have several self-hosted runners (8 cores, and 4 cores machines) and would like to make sure that some machines are prioritized over others because these machines have stronger hardware.

I am not sure tags are the right way to go here because I’d like to have all different jobs always prefer the group with 8 cores and only use the 4-core machines when there are no “fast” ones available.

Any idea how to do that?

Thanks

@taschik,

I am not sure tags are the right way to go here because I’d like to have all different jobs always prefer the group with 8 cores and only use the 4-core machines when there are no “fast” ones available.

If you set a job to run on the self-hosted runner with a specified label, the job will only use the available runners that have the specified label.

By default, the repository runners have the priority to be used for the workflow jobs in a repository. If there is not available repository runners, the jobs will check Organization runners. To view more details, you can see “Routing precedence for self-hosted runners”.

In your case, as a workaround, you can install the 8 cores runners as the repository runners and 4 cores runners as the Organization runners. More details, see “Adding self-hosted runners”.

Thanks @brightran for the reply. This would work for just two different classes of runners but is not viable anymore with more. On systems like Buildkite, you can configure a priority in combination with tags. It would be great to have this ability with self-hosted runners too. Perhaps a feature request?