-
Notifications
You must be signed in to change notification settings - Fork 62.5k
Description
What article on docs.github.com is affected?
https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
What part(s) of the article would you like to see updated?
This StackOverflow answer claims that GitHub Actions workflow steps are provided with an environment variable $RUNNER_OS
that contains the value of ${{ runner.os }}
.
This is confirmed by a simple workflow that just prints out env | sort
:
…
RUNNER_OS=Linux
RUNNER_PERFLOG=/home/runner/perflog
RUNNER_TEMP=/home/runner/work/_temp
RUNNER_TOOL_CACHE=/opt/hostedtoolcache
RUNNER_TRACKING_ID=github_069548eb-c4f3-4542-baac-43ed0d140801
RUNNER_USER=runner
RUNNER_WORKSPACE=/home/runner/work/pysam
…
It also appears to be confirmed by the runner source code; see https://github.com/actions/runner/blob/419ed24c1ee8c70eeb096570980e700e833f81f6/src/Runner.Worker/RunnerContext.cs#L13
The affected web page lists environment variables available to workflow steps, including $CI
and many variables of the form $GITHUB_xyz
. If (some of) these $RUNNER_xyz
environment variables are also supported for use by workflow steps, it would be useful if they were added to this listing.
Additional information
This is somewhat related to the previously-reported #2031, but that issue was interpreted as being about the context expression ${{ runner.os }}
rather than the environment variable $RUNNER_OS
.