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
GITHUB_ENV need more complete examples #7892
Comments
|
@jsoref Thanks for opening an issue! I'll triage this for the team to take a look Just a heads up, the team is out for the next two weeks, so we'll be very slow to respond |
Setting an environment variable (second link) talks about that almost exclusively:
Are you saying that the examples should reiterate this information? |
|
Maybe. Tangentially, every instance of
Anyone using The article isn't exclusively about |
|
Thanks for opening this, @jsoref. 🤔 I agree with @Simran-B that I think the 'next step' behavior is already adequately covered for the docs both the first articles mention, and in the second articles section.
The |
|
Hi folks, du you have an example for two environment variables? I try to set this with python but I have a lot's of trouble :( Thanks Georg |
|
Hi @bauergeorg. I'm glad you were able to find this ticket -- it's a perfect match to your problem. Your stack overflow and comment here are exactly the evidence supporting my request that github add one to the docs. I'm not entirely unsympathetic to the GitHub team's response. Some things (like explaining how environment variables are scoped to child processes) legitimately have to be out of scope for GitHub documentation. It does look like someone gave a correct answer on SO, which is good... |
Thanks for this feedback, @bauergeorg. Yep, this is correct. It's implied by the |
What article on docs.github.com is affected?
https://docs.github.com/en/actions/reference/environment-variables#about-environment-variables makes a passing reference to
GITHUB_ENVhttps://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?
All of the environment related "examples", the first one is almost an example, but even it isn't, and the rest are even less so.
This shows using an env var via
${{ env.* }}It doesn't show that
${{env.*}}won't work in the previous step (which is kinda important).(Stylistically, it'd be nice if there was a comment in the first line of each of these example fragments that pointed to code one could copy to get the rest of the boilerplate to have a working example.)
This doesn't show that it won't be available in this step, and it doesn't show what it looks like when it's used.
This is even less of an example.
A better example would use
whichorcommand -vboth right after the echo, and in the next step to show the impact.Additional information
https://github.community/t/following-github-actions-tutorial-but-getting-an-npm-eacces-error/188088/4
The text was updated successfully, but these errors were encountered: