runner icon indicating copy to clipboard operation
runner copied to clipboard

Add list of runner labels to runner context

Open igagis opened this issue 5 years ago • 1 comments

Describe the enhancement Add runner.labels variable to the runner context which will list all the runner labels.

Code Snippet Runner labels could be accessed from the workflow via ${{ runner.labels }}.

Additional information This might be useful to avoid some build steps on self-hosted runners with some pre-installed tools which would normally be installed as a build step on other runners.

igagis avatar Nov 25 '20 01:11 igagis

https://github.com/za8457/za8457.git

za8457 avatar Dec 16 '22 07:12 za8457

We also need to know the current runner ID.

cv3d avatar Jun 14 '23 05:06 cv3d

+1 for having a runner id variable exposed

Would be super useful for conditional flows depending on the machine ie. if: ${{ runner.id == 'self-hosted' }}

Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context

enchorb avatar Sep 22 '23 14:09 enchorb

Had to create workaround for this; https://github.com/marketplace/actions/runner-label-resolver, but realise that it's not reasonable to give org level access for access-token just to get runner labels... Hopefully we could get this right.

jupe avatar Oct 27 '23 13:10 jupe

Thank you for your interest in the runner application and taking the time to provide your valuable feedback. We kindly ask you to redirect this feedback to the GitHub Community Support Forum which our team actively monitors and would be a better place to start a discussion for new feature requests in GitHub Actions. For more information on this policy please read our contribution guidelines. 😃

github-actions[bot] avatar Dec 14 '23 00:12 github-actions[bot]