Visitar URL original
`$RUNNER_OS`/etc environment variables not documented (GitHub Actions) · Issue #6127 · github/docs · GitHub
The Wayback Machine - https://web.archive.org/web/20210518115107/https://github.com/github/docs/issues/6127
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

$RUNNER_OS/etc environment variables not documented (GitHub Actions) #6127

Open
jmarshall opened this issue May 7, 2021 · 7 comments
Open

$RUNNER_OS/etc environment variables not documented (GitHub Actions) #6127

jmarshall opened this issue May 7, 2021 · 7 comments

Comments

@jmarshall
Copy link

@jmarshall jmarshall commented May 7, 2021

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.

@welcome
Copy link

@welcome welcome bot commented May 7, 2021

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage label May 7, 2021
@github-actions github-actions bot added this to Triage in Docs team reviews May 7, 2021
@janiceilene
Copy link
Collaborator

@janiceilene janiceilene commented May 7, 2021

Thanks for opening an issue @jmarshall and looking for related issues 💖 I'll triage this for the team to take a look 👀

@janiceilene janiceilene added actions and removed triage labels May 7, 2021
@janiceilene janiceilene moved this from Triage to Content review needed in Docs team reviews May 7, 2021
@straves16
Copy link

@straves16 straves16 commented May 8, 2021

Thanks for reviewing docs related to my workflow api 💷💷💷💷💷💷💷💳

@BrucieBoy38

This comment was marked as off-topic.

@github github deleted a comment May 10, 2021
@lecoursen
Copy link
Member

@lecoursen lecoursen commented May 13, 2021

Hi there! Thanks for pointing this out. We should add that environment variable to https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables as you suggest. You or anyone else is welcome to open a PR doing so! ⚡

@lecoursen lecoursen moved this from Content review needed to Help wanted in Docs team reviews May 13, 2021
@jmarshall
Copy link
Author

@jmarshall jmarshall commented May 13, 2021 •

Only GitHub staff are in a position to confirm which of the seven RUNNER_* environment variables observed are intended to be supported for use in workflows.

Note that only three of the corresponding runner context properties are documented.

@BrucieBoy38

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants