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 enviroment variable to contain runner version #670

Closed
1 of 5 tasks
traversaro opened this issue Apr 3, 2020 · 3 comments
Closed
1 of 5 tasks

Add enviroment variable to contain runner version #670

traversaro opened this issue Apr 3, 2020 · 3 comments

Comments

@traversaro
Copy link

traversaro commented Apr 3, 2020

Describe the bug
In the GitHub Actions there is now the ImageVersion env variable that contains the image version, but it would be useful to have also a variable that contains the runner version. As on some platforms (for example macOS) the ${GITHUB_WORKSPACE} path contains the runner version, this can create problems with tools that hard-code their path in the build files if they are cached. To invalidate in an easy way the cache in this case, it would be great to have a env variable that contains the runner version, so it can be include in the cache id to automatically invalidate the cache when the ${GITHUB_WORKSPACE} changes. Unfortunately using directly the ${GITHUB_WORKSPACE} env variables does not work, probably because it contains strange characters as /.

Area for Triage:

Question, Bug, or Feature?:
Feature

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
It would be great to have an environment variable that contains the runner version, for use with cache.

Actual behavior
At the moment, there is no direct env variable that contains the runner version.

@traversaro traversaro changed the title a Add enviroment variable to contain runner version Apr 3, 2020
@traversaro
Copy link
Author

See robotology/whole-body-estimators#60 for a related downstream issue.

@maxim-lobanov
Copy link
Contributor

Hello @traversaro , thank you for your suggestion.
I believe it is request for https://github.com/actions/runner

@traversaro
Copy link
Author

Thanks @maxim-lobanov , that probably make sense, thanks for the hint!
In any case, I discovered that while ${{ env.GITHUB_WORKSPACE }} is not working correctly for some reason (probably you can use like that only the enviromental variable that you explicitly declared in the yml file) the ${{ runner.temp }} expression works correctly (see robotology/idyntree#667) so that is working for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants