-
Notifications
You must be signed in to change notification settings - Fork 765
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
Support $HOME in Path Argument #8
Comments
@ccjernigan, I think that the default path is HOME. Hence, |
I tried changing it to |
Indeed... This is the runner context on a regular shell step: {
"os": "Linux",
"tool_cache": "/opt/hostedtoolcache",
"temp": "/home/runner/work/_temp",
"workspace": "/home/runner/work/REPO_NAME"
} And the GitHub context contains: "workspace": "/home/runner/work/REPO_NAME/REPO_NAME",
"action": "run1",
"event_path": "/home/runner/work/_temp/_github_workflow/event.json" The point is that I don't know if you can rely on
Then, according to https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepsworking-directory, the following step option might work:
|
I tried setting The reason for filing this issue is so that we don't have to rely on I realize that most of the time, artifacts from the build will be in the checked out repo directory. In my case, I have a multi-module Gradle build so I want to collect artifacts across a series of directories. I'm doing a find with wildcards and then copying to another directory, and it seems less weird to create that copy in the home directory rather than within the git repo, to avoid namespace between the git repo contents and temp directories created by the CI script. |
@ccjernigan, just to make it clear, I totally agree with this issue/request. My comments above were an effort to find a currently supported workaround that could have filled your requirements. Unfortunately, it seems that there is none.
I apply a similar procedure, but I use a sibling directory, not a children nor any 'arbitrary' location. E.g.:
Of course, this relies on Apart from that, regarding wildcards and reorganizing the content with find/cp, you might want to upvote this comment in #3. |
Not adding much to the discussion, but it would be nice to be able to use any env variable (not just HOME). |
+1 |
We've added support for Using env variables as input to actions was added a while back ago (this was a limitation that was effecting all actions). I've updated our documentation with examples on how to use env variables and tilde expansions: https://github.com/actions/upload-artifact/tree/v2-preview#environment-variables-and-tilde-expansion |
Thanks for the update.
Just to confirm, according to this page:
i.e. you cannot arbitrarily expand environment variables as input values, for example. |
|
That's great, for this action specifically, but generally being unable to reference |
aha hm i see thanks
…On Mon, 6 Nov 2023 at 17:11, Bilge ***@***.***> wrote:
That's great, for this action specifically, but generally being unable to
reference $HOME in YAML configuration is still problematic for literally
every other action out there.
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXNMDTZBOU2QZ6C3FVUMXITYDED3ZAVCNFSM4IUI3AHKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZZGUZTCMRRGI2A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This is a feature request to support $HOME in the path.
I'm trying to use the upload-artifact action as a step in a CI build. Most of my other steps are saving and storing files based on paths relative to $HOME, so it makes sense to be able to do the same here.
The workaround currently is to hardcode the path.
So currently I do something like this:
But would like to do this:
The text was updated successfully, but these errors were encountered: