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
Maintain path relative to root folder #174
Comments
It'd be great to have an option to specify the root path to use for the artifacts. It could be optional, and if not specified the current behaviour would be used. As a workaround in the meantime you can make an empty file in
|
This behavior is documented: https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions The reason why only If you do something like |
There should be an option to maintain the paths. The reason is that if you use - name: Upload built files
uses: actions/upload-artifact@v2
with:
path: |
./dist - name: Download articats
uses: actions/download-artifact@v2
- name: Place artifacts
shell: bash
run: |
rm -rf dist
mv artifact/* ./ |
I found a way around this - include one other file in your artifact which doesn't have the same base path as all the other files. |
To preserve directory of uploaded items actions/upload-artifact#174 (comment)
Thanks for the workaround @rcowsill & @tulsishell I would love to see a simple option for maintaining paths, it's causing similar issues on our end and I'm not even interested in using wildcards. Edit: this workaround also means I can't use |
Frustratingly, an approach that can't be used with parallel jobs I assume, since unless each choses a unique "one other file", the mentioned 503 errors will kick in. |
I'm running this to keep the dir structure
and then specify both for upload. Which is... not great, but works. |
It would be helpful if my artifact would not squash the directory structure. For example,
I end up with a zipfile containing
file.js
andfile.css
. What I want is a zipfile containingroot/relative/path/to/my/file.js
androot/relative/path/to/my/file.css
-- edit --
The reason for this is so that I can unpack it on my project file for use in the next job
-- edit --
This command produces the behavior I am looking for. I am having to manually pack & unpack it. But this gives you the idea:
This gives me a zip file with
root/relative/path/to/my/file.js
androot/relative/path/to/my/file.css
The text was updated successfully, but these errors were encountered: