Specify scope of default environment variables
It is not obvious that default environment variables will not be available in the env context. We add a note to that regard.
Why:
Closes: #24895
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following:
- [x] I have reviewed my changes in staging (look for the "Automatically generated comment" and click the links in the "Preview" column to view your latest changes).
- [x] For content changes, I have completed the self-review checklist.
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.
Automatically generated comment âšī¸
This comment is automatically generated and will be overwritten every time changes are committed to this branch.
The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.
Content directory changes
You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
| Source | Preview | Production | What Changed |
|---|---|---|---|
actions/learn-github-actions/variables.md |
fpt ghec ghes@ 3.10 3.9 3.8 3.7 3.6 ghae |
fpt ghec ghes@ 3.10 3.9 3.8 3.7 3.6 ghae |
fpt: Free, Pro, Team ghec: GitHub Enterprise Cloud ghes: GitHub Enterprise Server ghae: GitHub AE
@valentin-krasontovitsch Thank you for opening a PR and linking it to your issue! â¨
I'll get this triaged for review! :zap:
four months for a simple, small docs update. I have my own project that I'm woefully neglecting, so I understand this can happen, but that one has just one maintainer, and is free-time based :sweat_smile:
@valentin-krasontovitsch Thanks for checking in on this. It is up on the board for review đ
We appreciate your patience as we are working through our backlog đ
Of course, thank you for your response, and godspeed :rainbow:
Hey @valentin-krasontovitsch, thank you so much for your patience with us as we work through our backlog. đââī¸
I do see how it would be confusing for users to know how to use default environment variables in workflows with the way the docs are currently written. There is a note underneath the table of default environment variables that says:
Most of the default variables have a corresponding, and similarly named, context property. For example, the value of the
GITHUB_REFvariable can be read during workflow processing using the${{ github.ref }}context property.
What do you think of this idea:
We could move that out of the note and into its own paragraph after the first sentence in the introduction. We could also add a sentence before it so that we say something along the lines of:
Because default environment variables are set by GitHub and not defined in a workflow, they are not accessed through the
envcontext. However, most of the default variables have a corresponding, and similarly named, context property. For example, the value of theGITHUB_REFvariable can be read during workflow processing using the${{ github.ref }}context property.
Would that make things more clear in this doc? Let me know! Thank you for helping to improve GitHub's docs! âĄ
yes i think that would definitely help! thanks for the much better suggestion : )
should i change this PR to reflect your suggestions, or close this one and leave it to you / somebody else to create a new PR?
That's awesome. đ @valentin-krasontovitsch if you want to update this PR, then I can accept your changes and get them merged!
it is done ^^
let me know if the new diff is OK, and if the commit message is up to par.
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 :zap: