Add generic information on how the environment files work for GitHub Action Workflow Commands #31568
Open
1 task done
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
help wanted
Anyone is welcome to open a pull request to fix this issue
Projects
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions?ref=jessehouwing.net&tool=powershell#environment-files
What part(s) of the article would you like to see updated?
The code samples explain how to use bash or PowerShell to set variables and such, but don't explain the concept of the environment files very well. There is no need to do this explicitly in Bash or PowerShell, one can do it from msbuild or C# or a node script once you understand how it works.
I propose to either add a separate page or a paragraph in the "environment files" section, explaining the underlying concept of the
$GITHUB_OUTPUT
variable containing the file name in which these output variables are stored. And that"a-b">>$GITHUB_OUTPUT
basically appends a line to the bottom of that file. And to document that that file needs to be written in utf-8 encoding.That way you can easily translate that to C#, or msbuild, or python or java or node or go or anything else. Any tool that runs inside the workflow can interact with the agent in this way.
Additional information
No response
The text was updated successfully, but these errors were encountered: