-
Notifications
You must be signed in to change notification settings - Fork 989
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
feature: add OS distro name and version to runner context #2527
Comments
Now, a universay way to do that for most modern Linux distros is this (example in shell): . /etc/os-release
echo "distro_id=$ID"
echo "distro_version=$VERSION_ID" Here's what it shows on my Fedora 37 laptop:
and here's the example of output on Ubuntu 22.04:
|
Or perhaps it's the runner image itself that should provide that information? |
Hey @kolyshkin, 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. |
@nikola-jokic thanks for the detailed explanation! I think I will concede the honor of opening this feature request discussion to whoever is going to fix actions/setup-go#368 and similar issues. |
For the sake of people reading this, this information is actually available from the GHA environment since March 2020, see actions/runner-images#345. For usage example, see https://github.com/actions/setup-go/pull/383/files |
Similar to #1185, it would be nice to have OS distro name and version in runner context.
For example, the value of
runner.os
is used by actions/cache as part of the cache key, so that the cache for Windows won't be reused on MacOS. Surely, it also makes sense to userunner.arch
as binary artefacts from ARM won't work on e.g. X64 (filed actions/cache#1146)What's missing is OS distro name (such as "ubuntu", in case other distros will be used in the future) and the distro version (such as "20.04" or "22.04". This is needed because the code (object files, for example) compiled on Ubuntu 22.04 won't work on Ubuntu 20.04. I guess this may also be true for Windows and Mac OS X (e.g. binaries for Mac OS 12 might not work on Mac OS 11).
Making this available might help solve problems like actions/setup-go#368 (and avoid similar hard-to-debug issues in the future).
The text was updated successfully, but these errors were encountered: