I want to execute a step in a self hosted runner but I don't want to specify the runner label in the yml. I have created a repository label with a name and the runner's label as value as shown in the image. Is it possible to access this variable value in the runs-on section of a step?
Hi Sérgio,
This is not supported at the moment in a static yml file. We have a feature request that you can vote for to express your interest:
If you look at the last reply in that feature request (on 8th August 2024), one of my colleagues shared that this is possible with dynamic pipelines (this is a feature available on the Premium billing plan). My colleague also shared a few resources on dynamic pipelines:
And an example dynamic pipelines app that does something similar:
I believe your use case could be achieved by retrieving the variable in the app with an API call:
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.