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

Clarify nature of GITHUB_ENV/GITHUB_PATH variables #9236

Merged
merged 3 commits into from
Sep 24, 2021

Conversation

davidjb
Copy link
Contributor

@davidjb davidjb commented Aug 23, 2021

Why:

When reading the existing documentation at https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable, I was under the impression that $GITHUB_ENV and $GITHUB_PATH would both be applied in the same way, both being available as environment variables within a given shell (the run command) in subsequent steps. However, the former requires explicit referencing in expression syntax (or use of the $GITHUB_ENV file directly) whereas the latter is introduced in the shell environment's $PATH automatically. The docs don't currently state this; they allude to it in various other pages but not specifically spell this out.

Closes #9235

What's being changed:

This adds a note and clarification around the explicit nature of using $GITHUB_ENV but the implicit, automatic application of $GITHUB_PATH.

Check off the following:

  • I have reviewed my changes in staging (look for the latest deployment event in your pull request's timeline, 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")

This adds a note and clarification around the explicit nature of using $GITHUB_ENV but the implicit, automatic application of $GITHUB_PATH.  When reading the existing documentation, I was under the impression that these would both be applied in the same way, but the former requires explicit referencing in expression syntax whereas the latter is introduced in the shell environment automatically.
@welcome
Copy link

welcome bot commented Aug 23, 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 Aug 23, 2021
@ramyaparimi ramyaparimi added actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Aug 23, 2021
@ramyaparimi
Copy link
Contributor

@davidjb Thanks so much for opening a PR! I'll get this triaged for review ⚡

Copy link

@L2021 L2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its interesting

Copy link

@L2021 L2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it up friend

skedwards88
skedwards88 previously approved these changes Sep 23, 2021
Copy link
Contributor

@skedwards88 skedwards88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thanks for making this addition! I'll get this merged down for you.

@skedwards88 skedwards88 enabled auto-merge (squash) September 23, 2021 18:49
@skedwards88 skedwards88 added the ready to merge This pull request is ready to merge label Sep 23, 2021
@github-actions github-actions bot removed the waiting for review Issue/PR is waiting for a writer's review label Sep 23, 2021
@ramyaparimi
Copy link
Contributor

@davidjb It looks like I don't have permission to resolve the merge conflict. I think if you enable the checkbox to allow maintainer edits, then I will be able to resolve this. (https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork ) Alternatively, could you resolve the merge conflict?

@davidjb
Copy link
Contributor Author

davidjb commented Sep 24, 2021

@ramyaparimi the checkbox was already enabled so hopefully that’s good to go. Otherwise, I can take a look tomorrow and rebase the changes.

@ramyaparimi ramyaparimi dismissed stale reviews from skedwards88 and ghost via 0e49916 September 24, 2021 17:46
Copy link
Contributor

@ramyaparimi ramyaparimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving again after resolving conflicts!

@skedwards88 skedwards88 merged commit f690661 into github:main Sep 24, 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

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 content This issue or pull request belongs to the Docs Content team ready to merge This pull request is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Environment variable availability with GITHUB_ENV is unclear
4 participants