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

Remove the mention of HOME environment variable #328

Merged
merged 4 commits into from
Oct 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion content/actions/reference/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ We strongly recommend that actions use environment variables to access the files
| Environment variable | Description |
| ---------------------|------------ |
| `CI` | Always set to `true`. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've got another similar PR where someone is suggesting to add the Windows-specific variable rather than removing the HOME variable. Curious what your thoughts are there?

I can see removing the OS-specific variables, but it might be helpful as we do describe that the directory is where user data is stored.

Suggested change
| `CI` | Always set to `true`. |
| `CI` | Always set to `true`. |
| `HOME` | (On Linux and macOS runners) The path to the {% data variables.product.prodname_dotcom %} home directory used to store user data. For example, `/github/home`. |
| `HOMEPATH` | (On Windows runners) The path to the {% data variables.product.prodname_dotcom %} home directory used to store user data. For example, `c:\Users\runneradmin`. |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My strongly opinion is we must not mess user home dir related and OS specific environment variable with the github specific variable.

In fact "The path to the GitHub home directory used to store user data" has nothing to do with "home dir to store user settings"

As a result, the first step is to remove the mentioning of UNIX-specific environment variable HOME and the second step is to add something like "GITHUB_HOME" or "GITHUB_DATA" or "GITGHUB_WORKDIR" which might point to the same directory as HOME or to another.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I agree with Sergey and @thboop mentioned the similar point #328 (comment)
We should not mess variables that are set by GitHub and variables are set by system. At least, because there are a ton of other system variables that we don't want to describe here.

but it might be helpful as we do describe that the directory is where user data is stored.

Actually, it is already described GITHUB_WORKSPACE.

The GitHub workspace directory path. The workspace directory is a copy of your repository if your workflow uses the actions/checkout action. If you don't use the actions/checkout action, the directory will be empty. For example, /home/runner/work/my-repo-name/my-repo-name.

I guess @dsame meant the same under GITHUB_HOME

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rachmari with the GITHUB_WORKSPACE already there's no sense to mention HOME variable at all. It works for windows users but confuses *nix guys because of messing with shell HOME variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll close out the other PR that is suggesting to add the HOMEPATH variable and I'll get this update shipped.

| `HOME` | The path to the {% data variables.product.prodname_dotcom %} home directory used to store user data. For example, `/github/home`. |
| `GITHUB_WORKFLOW` | The name of the workflow. |
| `GITHUB_RUN_ID` | {% data reusables.github-actions.run_id_description %} |
| `GITHUB_RUN_NUMBER` | {% data reusables.github-actions.run_number_description %} |
Expand Down