Skip to content

Describe $RUNNER_OS/$RUNNER_TEMP/$RUNNER_TOOL_CACHE environment variables #6740

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

Merged
merged 11 commits into from
Jun 16, 2021

Conversation

jmarshall
Copy link
Contributor

@jmarshall jmarshall commented May 24, 2021

Why:

Closes #6127.

What's being changed:

As noted in #6127, several $RUNNER_xyz environment variables are set up by runners corresponding to ${{ runner.xyz }} context properties. A total of seven RUNNER_* environment variables are currently set in job steps, and it is unclear which are intended to be used and are supported for use by workflow steps. There are three corresponding runner context properties that are documented in “Context and expression syntax for GitHub Actions”, so this PR adds the environment variables corresponding to these three to the “Default environment variables” list:

Environment variable Description
RUNNER_OS The operating system of the runner executing the job. Possible values are Linux, Windows, or macOS.
RUNNER_TEMP The path of the temporary directory for the runner. This directory is guaranteed to be empty at the start of each job, even on self-hosted runners.
RUNNER_TOOL_CACHE The path of the directory containing some of the preinstalled tools for [GitHub]-hosted runners. For more information, see "Specifications for [GitHub]-hosted runners".

(The tool_cache property value is not documented as being used for GitHub AE, so this PR just leaves $RUNNER_TOOL_CACHE unlisted and undocumented in this case.)

In considering merging this, it would be prudent for GitHub staff to confirm exactly which of these environment variables are intended to be supported for use in workflow steps; in particular, to confirm whether exactly these three are supported as environment variables, similarly to their context property equivalents.

(On #6127 it was suggested that I might attempt to confirm which are supported by contacting GitHub Support. However there is little point in a non-GitHub-employee such as myself doing that, as whoever took responsibility for merging this would need to confirm directly with other GitHub employees (in engineering or support) that the information so obtained was accurate.)

Check off the following:

  • I have reviewed my changes in staging (look for the deploy-to-heroku link in your pull request, then click View deployment).
  • For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

  • This pull request impacts the contribution experience
    • I have added the 'writer impact' label
    • I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

Runners set up environment variables corresponding to the runner
context's properties. The runner context documents the runner.os,
runner.temp, and runner.tool_cache properties, so document these
three as supported environment variables similarly. The tool_cache
property value is not documented as being used for GitHub AE (see
context-and-expression-syntax-for-github-actions.md), so just leave
$RUNNER_TOOL_CACHE undocumented in this case.
@welcome
Copy link

welcome bot commented May 24, 2021

Thanks for opening this pull request! 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 Do not begin working on this issue until triaged by the team label May 24, 2021
Narin506
Narin506 previously approved these changes May 25, 2021
@janiceilene
Copy link
Contributor

👋 @jmarshall We cannot accept this PR until you've verified with support which environment variables should be documented. After you get that information from the support team please feel free to open a new issue with that information.

Thanks for your interest in improving the GitHub docs!

@jmarshall
Copy link
Contributor Author

jmarshall commented May 26, 2021

This repository's CONTRIBUTING.md says

We (usually the docs team, but sometimes GitHub product managers, engineers, or supportocats too!) review every single PR.

This implies that sometimes the GitHub Docs team brings PRs to the attention of their GitHub colleagues in the relevant part of Engineering who will review them directly. That would be a much more efficient way to verify which of these environment variables are supported than for me to compose the question a third time in such detail that Support sees its meaning, routes the question to the right people, and replies in a reasonable timeframe. But, as noted above, even if that happened it would be pointless because you would have no reason to believe what I, a non-GitHub-employee, reported — so the Docs team would have to verify it directly with Engineering anyway.

I notice that in e.g. #3060 (comment), #3788 (review), #4945 (comment), #5359 (comment), and #6615 (comment) the Docs team have themselves consulted their colleagues elsewhere within GitHub to directly verify aspects of these other outsiders' PRs.

Is there a reason why this PR is being treated differently? Thanks.

@janderssonse
Copy link

Following. The reason given for closing this does not make sense at all IMHO. It basically says that PR's for GH Docs should go to https://support.github.com/contact first?

@janiceilene
Copy link
Contributor

👋 @jmarshall I’ve spoken with the team and we've decided to reopen this PR. I apologize for closing this PR prematurely. Thank you for taking the time to voice your concerns with our process so that we can continue to improve.

Please note that we’ll still need to validate with the engineering team and don’t know when they’ll have the bandwidth to prioritize. We appreciate your patience.

@janiceilene janiceilene reopened this Jun 1, 2021
@martin389 martin389 self-assigned this Jun 2, 2021
@martin389
Copy link
Contributor

martin389 commented Jun 2, 2021

Changes in this PR

(The links below will stop working after merge)

Article in staging Changes
Default environment variables Adds entries to table for RUNNER_OS, RUNNER_TEMP, and RUNNER_TOOL_CACHE
"Context and expression syntax for GitHub Actions" Moved descriptions into reusables for consistency.

@martin389
Copy link
Contributor

(Closing and reopening this PR for CI purposes)

@martin389 martin389 closed this Jun 2, 2021
@martin389 martin389 reopened this Jun 2, 2021
@martin389
Copy link
Contributor

Checking questions with support.

@janiceilene janiceilene added waiting for review Issue/PR is waiting for a writer's review actions This issue or pull request should be reviewed by the docs actions team and removed triage Do not begin working on this issue until triaged by the team labels Jun 8, 2021
@martin389
Copy link
Contributor

Sorry about the delay here, following up 👍

@martin389
Copy link
Contributor

Received confirmation that these environment variables are supported: RUNNER_OS, RUNNER_TEMP, and RUNNER_TOOL_CACHE 👍

martin389
martin389 previously approved these changes Jun 16, 2021
@martin389 martin389 merged commit 7a1355b into github:main Jun 16, 2021
@github-actions
Copy link
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

@martin389
Copy link
Contributor

Changes are now live:

Published article Changes
Default environment variables Adds entries to table for RUNNER_OS, RUNNER_TEMP, and RUNNER_TOOL_CACHE
"Context and expression syntax for GitHub Actions" Moved descriptions into reusables for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$RUNNER_OS/etc environment variables not documented (GitHub Actions)
6 participants