-
Notifications
You must be signed in to change notification settings - Fork 68.8k
Clarify how multiline output values can be set via GITHUB_OUTPUT #21529
Copy link
Copy link
Closed
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issueAnyone is welcome to open a pull request to fix this issuewaiting for reviewIssue/PR is waiting for a writer's reviewIssue/PR is waiting for a writer's review
Description
Activity
Metadata
Metadata
Assignees
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issueAnyone is welcome to open a pull request to fix this issuewaiting for reviewIssue/PR is waiting for a writer's reviewIssue/PR is waiting for a writer's review
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
What part(s) of the article would you like to see updated?
Due to recent changes, I had to switch our codeflows from using
set-outputto the method described in the section on "Setting an output parameter", by appending to (the file with the name in the variable)$GITHUB_OUTPUT.This is very similar to how
$GITHUB_ENVworks in the previous section.I had need to post a multiline output, and so decided to just try the technique described for "Environment files" (the preceding section). That is, I used the pattern
and ended up with code looking like this:
And as far as I can tell, this worked great (and is much simpler than what I had to do before).
I think it would be beneficial if this possibility was pointed out by the documentation. Simply saying something akin to "multi-line output values can be set with the same technique used in the previous section to define multi-line environment variables" would already help a lot.
Additional information
No response
edited by maintainer
Content plan here