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

Set ImageOS environment variable in runner images #715

Closed
strideynet opened this issue Aug 5, 2021 · 3 comments
Closed

Set ImageOS environment variable in runner images #715

strideynet opened this issue Aug 5, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@strideynet
Copy link

Is your feature request related to a problem? Please describe.

Several off the shelf actions expect the ImageOS environment variable to be populated (e.g ruby/setup):

Run ruby/setup-ruby@v1
  with:
    ruby-version: 2.6
    bundler: default
    bundler-cache: false
    working-directory: .
    cache-version: 0
Error: The environment variable ImageOS must be set

Describe the solution you'd like

We should set a closest approximation of the ImageOS environment variable in the docker images (e.g ubuntu20)

Describe alternatives you've considered

You can set this as part of the Runner spec.

@callum-tait-pbx
Copy link
Contributor

callum-tait-pbx commented Aug 5, 2021

https://github.com/actions/virtual-environments/blob/b7f276c003aea42575b52247bdb2183e355fca2f/images/linux/scripts/installers/configure-environment.sh

We should probably set it the same way GitHub does for their ubuntu instances i.e. whatever value the below produces:

echo ImageOS=$IMAGE_OS | tee -a /etc/environment

EDIT

I guess the values should be these:

https://github.com/actions/virtual-environments/blob/966395f4bd2afb5c93752996e8738f66fb88dafd/images/linux/ubuntu1804.json#L24
https://github.com/actions/virtual-environments/blob/966395f4bd2afb5c93752996e8738f66fb88dafd/images/linux/ubuntu2004.json#L24

@consideRatio
Copy link
Contributor

This PR is fixed by #730 according to the PR

@toast-gear
Copy link
Collaborator

No issues reported since release, closing as resolved.

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

No branches or pull requests

4 participants