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
Contradictory info on $GITHUB_OUTPUT
#31211
Comments
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. |
@95-martin-orion Thank you for opening this issue! I'll get this triaged for review ✨ |
i want to konw, jobs:
check:
steps:
- name: Check for new commits
run: |
echo "new_commits=true" >> "$GITHUB_OUTPUT"
build:
needs: check
if: ${{ needs.check.outputs.new_commits}} I cannot correctly determine but: outputs:
new_commits: ${{ steps.check.outputs.new_commits }}
build:
needs: check
if: ${{ needs.check.outputs.new_commits}} it do.
Is it necessary to clarify that |
Hey @95-martin-orion, thank you for opening this issue! I definitely see where your confusion is coming from. While the contents of the output file are shared between all steps in a job, the path to the output file changes in each step. For example, on the first step the path to the output file could be To make this clearer in the docs, I think we could update this line to say:
Instead of saying the file is unique to the current step, we'll say that the path to the file is unique to the current step. You or anyone else is welcome to open a pull request to make these changes! |
Code of Conduct
What article on docs.github.com is affected?
Defining outputs for jobs (source) and Default environment variables (source).
What part(s) of the article would you like to see updated?
The note in this line:
docs/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Line 11 in 66af710
appears to contradict this entry in the table:
docs/content/actions/learn-github-actions/variables.md
Line 316 in 66af710
Is the value of
$GITHUB_OUTPUT
shared between all steps, or unique to each step?Docs Plan
Outlined in this comment.
The text was updated successfully, but these errors were encountered: