Skip to content
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

Add generic information on how the environment files work for GitHub Action Workflow Commands #31568

Open
1 task done
jessehouwing opened this issue Feb 10, 2024 · 4 comments
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

Comments

@jessehouwing
Copy link
Contributor

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

@jessehouwing jessehouwing added the content This issue or pull request belongs to the Docs Content team label Feb 10, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Feb 10, 2024
@nguyenalex836 nguyenalex836 added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Feb 12, 2024
@nguyenalex836
Copy link
Contributor

@jessehouwing Thank you for raising this issue! I'll get this triaged for review ✨ Our team will provide feedback regarding the best next steps for this issue - thanks for your patience! 💛

@SiaraMist
Copy link
Contributor

Hey @jessehouwing, thanks so much for opening this issue! ✨

I agree that we could do a better job of explaining what environment files are and how they work in this section.

We should update the paragraph in Environment files to include the following information:

  • Add brief examples of what environment files can do, such as storing job outputs or environment variables so you can use them in subsequent steps and jobs.

  • We can edit the following sentence:

    The path to these files are exposed via environment variables.

    We should communicate that you can use GitHub's default environment variables to access the path to these files and edit them. We could also link to Default environment variables so it's easy to see a list of available environment files.

You or anyone else is welcome to open a pull request to make these changes!

@SiaraMist SiaraMist added help wanted Anyone is welcome to open a pull request to fix this issue and removed waiting for review Issue/PR is waiting for a writer's review labels Feb 16, 2024
@docs-bot docs-bot added this to Help wanted in Docs open source board Feb 16, 2024
@code-Gambler
Copy link
Contributor

This page does a better job of explaining this concept.

@gsosm0760

This comment was marked as spam.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label May 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Docs open source board automation moved this from Help wanted to Done May 14, 2024
@nguyenalex836 nguyenalex836 removed the stale There is no recent activity on this issue or pull request label May 14, 2024
@nguyenalex836 nguyenalex836 reopened this May 14, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label May 14, 2024
@nguyenalex836 nguyenalex836 removed the triage Do not begin working on this issue until triaged by the team label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Development

No branches or pull requests

6 participants
@jessehouwing @code-Gambler @SiaraMist @nguyenalex836 @gsosm0760 and others