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 that github.env is not related to env #32132

Closed
1 task done
jsoref opened this issue Mar 18, 2024 · 4 comments
Closed
1 task done

clarify that github.env is not related to env #32132

jsoref opened this issue Mar 18, 2024 · 4 comments
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 more-information-needed More information is needed to complete review stale There is no recent activity on this issue or pull request

Comments

@jsoref
Copy link
Contributor

jsoref commented Mar 18, 2024

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

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

The text for github.env says:

Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see "Workflow commands for GitHub Actions."

Two things to add:

  1. Not to be confused with env.
  2. Not available in jobs.<*>.if for the same reason that env isn't -- see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability

Additional information

I ran into a PR where someone was trying to use github.env.foo in a jobs[*].if to work around the fact that env isn't available at this point.

@jsoref jsoref added the content This issue or pull request belongs to the Docs Content team label Mar 18, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Mar 18, 2024
@nguyenalex836 nguyenalex836 added 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 and removed triage Do not begin working on this issue until triaged by the team labels Mar 18, 2024
@nguyenalex836
Copy link
Contributor

@jsoref Thank you for raising this issue! I'll get this triaged for review ✨ Our team will provide feedback regarding the best next steps for this issue - thanks for your patience! 💛

@Miranda36782

This comment was marked as spam.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label May 20, 2024
@nguyenalex836
Copy link
Contributor

@jsoref Thanks again for submitting this issue!

Not to be confused with env.

I ran into a PR where someone was trying to use github.env.foo in a jobs[*].if to work around the fact that env isn't available at this point.

After reviewing with the team, we found the PR you referenced confusing github.env with env is likely an edge case. The description of github.env begins by explaining it is a path to the environment variable file, rather than a way to access the environment. For this reason, we won't be adding a note to clarify the difference between the two 💛

Not available in jobs.<*>.if for the same reason that env isn't -- see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability

Would you be able to write a workflow to test this? Your results would greatly help us determine next steps regarding this point ✨

@nguyenalex836 nguyenalex836 added more-information-needed More information is needed to complete review and removed stale There is no recent activity on this issue or pull request waiting for review Issue/PR is waiting for a writer's review labels May 23, 2024
Copy link
Contributor

github-actions bot commented Jun 6, 2024

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. See this blog post on bug reports and the importance of repro steps for more information about the kind of information that may be helpful.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Jun 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2024
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 more-information-needed More information is needed to complete review stale There is no recent activity on this issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants