feature: add OS distro name and version to runner context
See original GitHub issueSimilar 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 use runner.arch
as binary artefacts from ARM won’t work on e.g. X64 (filed https://github.com/actions/cache/issues/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 https://github.com/actions/setup-go/issues/368 (and avoid similar hard-to-debug issues in the future).
Issue Analytics
- State:
- Created 5 months ago
- Comments:5 (1 by maintainers)
For the sake of people reading this, this information is actually available from the GHA environment since March 2020, see https://github.com/actions/runner-images/issues/345. For usage example, see https://github.com/actions/setup-go/pull/383/files
@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 https://github.com/actions/setup-go/issues/368 and similar issues.