Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list of runner labels to runner context #821

Closed
igagis opened this issue Nov 25, 2020 · 5 comments · May be fixed by #2074
Closed

Add list of runner labels to runner context #821

igagis opened this issue Nov 25, 2020 · 5 comments · May be fixed by #2074

Comments

@igagis
Copy link

igagis commented Nov 25, 2020

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 igagis added the enhancement New feature or request label Nov 25, 2020
@thboop thboop added the Actions Feature Feature requires both runner, pipelines service and launch changes label Apr 20, 2022
@za8457
Copy link

za8457 commented Dec 16, 2022

@cv3d
Copy link

cv3d commented Jun 14, 2023

We also need to know the current runner ID.

@enchorb
Copy link

enchorb commented Sep 22, 2023

+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

@jupe
Copy link

jupe commented Oct 27, 2023

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.

@ruvceskistefan ruvceskistefan added actions-feature and removed enhancement New feature or request Actions Feature Feature requires both runner, pipelines service and launch changes labels Dec 12, 2023
Copy link
Contributor

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 github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants