docs
docs copied to clipboard
default environment variables - where can they be used?
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
What part(s) of the article would you like to see updated?
the section on default environment variables. it says
The default environment variables that GitHub sets are available to every step in a workflow.
but when I try for instance to use such a variable as input to a step using a composite action, as in
- name: Fetch job html
uses: ./.github/actions/job_html_url
with:
job_name: ${{ env.GITHUB_JOB }}
the passed input is the empty string.
I would like to see more specifically where in a step these env vars can be used, as i would expect that they can be accessed using the env
context in expressions, but apparently this is not the case. not even a step with
run: echo ${{ env.GITHUB_JOB }}
works! it seems they are not accessible through the env context at all :thinking:
Additional information
No response
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
@valentin-krasontovitsch Thank you for opening an issue and linking it to your PR! ✨
A stale label has been added to this issue becuase it has been open for 60 days with no activity. To keep this issue open, add a comment within 3 days.
we have a PR, which is waiting for review
A stale label has been added to this issue because it has been open for 60 days with no activity. To keep this issue open, add a comment within 3 days.
we still have a PR, which is waiting for review