-
Notifications
You must be signed in to change notification settings - Fork 59.3k
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
Update misleading note in section-defining-outputs-for-jobs.md #33842
Conversation
Automatically generated comment ℹ️This comment is automatically generated and will be overwritten every time changes are committed to this branch. The table contains an overview of files in the Content directory changesYou may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
fpt: Free, Pro, Team |
@piotrekkr Thanks so much for opening a PR! I'll get this triaged for review ✨ |
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks for the contribution! I think it's worth adding, if only for the fact that it's removing incorrect information. The example should be the base use case though, as users might inadvertently copy it without knowing what it's supposed to do. The warning can be added separately 👍
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jacob Wallraff <thyeggman@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more corrections to the workflow to match the new matrix strategy 👍
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jacob Wallraff <thyeggman@github.com>
Co-authored-by: Jacob Wallraff <thyeggman@github.com>
Co-authored-by: Jacob Wallraff <thyeggman@github.com>
@thyeggman All is be done I think. Should I resolve discussions or should it be you? |
@piotrekkr Thank you so much for working with @thyeggman on those suggestions! 💛 I'll update the branch and get this merged once tests are passing 🍏 |
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
Because note about handling outputs when using strategy matrix is misleading and wrong in multiple places. Here is my overview of what is wrong:
This is simply not true. Each step has it's own unique outputs file that it can write to. Next steps cannot override previous step outputs which is even show in usage example.
Using
$GITHUB_OUTPUT
does not override any job outputs. It can only set or override step outputs. Job need to define its own outputs and it can usesteps
context for this but this is not required for job outputs definition. Author of this note probably mixed step outputs with job outputs. Each job outputs inside matrix are combined, this is true, but author forgot to mention that last finished job in matrix will add new and override matching job outputs from all previous jobs.There is no way to use
contexts
within job outputs names. I tested it and always had an error from GitHub when trying to run workflow. Something like this is not allowed:What's being changed (if available, include any code snippets, screenshots, or gifs):
I've changed the note content and added an example of how matrix job outputs are combined.
Check off the following:
I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).
data
directory.For content changes, I have completed the self-review checklist.