Sitelet https://web.archive.org/web/20210719195501/https://github.com/github/docs/issues/7553
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

Inconsistent description of scope of env set via GITHUB_ENV #7553

Open
tingzuge-dio opened this issue Jun 21, 2021 · 4 comments
Open

Inconsistent description of scope of env set via GITHUB_ENV #7553

tingzuge-dio opened this issue Jun 21, 2021 · 4 comments

Comments

@tingzuge-dio
Copy link

@tingzuge-dio tingzuge-dio commented Jun 21, 2021 •

Description of GITHUB_ENV is inconsistent regarding if set envs are available across the workflow or only within a job.

What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/environment-variables#about-environment-variables
https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable

What part(s) of the article would you like to see updated?

You can also use the GITHUB_ENV environment file to set an environment variable that the following steps in a workflow can use. The environment file can be used directly by an action or as a shell command in a workflow file using the run keyword. For more information, see "Workflow commands for GitHub Actions."

Creates or updates an environment variable for any actions running next in a job. The action that creates or updates the environment variable does not have access to the new value, but all subsequent actions in a job will have access. Environment variables are case-sensitive and you can include punctuation.

Additional information

I am having some trouble finding docs that summarizes scopes of variables, workspaces, etc. in GitHub Actions. It seems like this would be a fairly relevant to many pipelines and should be addressed directly in the docs.

@janiceilene
Copy link
Collaborator

@janiceilene janiceilene commented Jun 22, 2021

Thanks so much for opening an issue @tingzuge-dio! I'll triage this for the team to take a look 👀

@janiceilene janiceilene moved this from Triage to Content review needed in Docs team reviews Jun 22, 2021
@lucascosti
Copy link
Contributor

@lucascosti lucascosti commented Jul 14, 2021 •

Thanks for pointing this out, @tingzuge-dio. You are correct that these are inconsistent when they should be the same; it applies to all following steps in a job.

These would be the correct wording:

You can also use the GITHUB_ENV environment file to set an environment variable that the following steps in a job can use. The environment file can be used directly by an action or as a shell command in a workflow file using the run keyword. For more information, see "Workflow commands for GitHub Actions."

Creates or updates an environment variable for any steps running next in a job. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. Environment variables are case-sensitive and you can include punctuation.

Anyone can feel free to open a PR to change ☝️ 🙂

@docubot docubot moved this from Content review needed to Help wanted in Docs team reviews Jul 14, 2021
@j-saurabh
Copy link

@j-saurabh j-saurabh commented Jul 16, 2021

Is this still needs to be fixed? I would like to take this up and make the changes.

@ramyaparimi
Copy link
Collaborator

@ramyaparimi ramyaparimi commented Jul 19, 2021

@j-saurabh Please feel free to open a PR 👍

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