upload-artifact
upload-artifact copied to clipboard
[bug] Explicitly listed path that starts with a dot is ignored.
What happened?
Explicitly referenced files, e.g. .coverage.db are not uploaded.
What did you expect to happen?
The file should be uploaded as it exists and is explicitly listed: https://github.com/socketry/protocol-http/commit/036101536b693f1569f9b139934d4946cda7120d
How can we reproduce it?
Explicitly listing a path that starts with a dot.
Anything else we need to know?
No response
What version of the action are you using?
v4
What are your runner environments?
linux
Are you on GitHub Enterprise Server? If so, what version?
No response
I understand the value of ignoring hidden files when using glob patterns, but ignoring a file which is explicitly listed with an error "Warning: No files were found with the provided path: .covered.db. No artifacts will be uploaded." is extremely confusing, and made me think something was wrong with my own software. Suggest the following:
- Indicate in the error that files were matched but ignored.
- If an explicit path is given and matches, it should not be ignored.
It might also be a nice idea to document somewhere what hidden files are, e.g. are we talking about dot files, .gitignoreed files, or anything else?
I think I am also hitting this problem in https://github.com/abravalheri/validate-pyproject/actions/runs/11034259945/job/30647361576.
In this GHA step, I am making sure all files exist and that the directory to be uploaded is not empty:
https://github.com/abravalheri/validate-pyproject/compare/v0.20...v0.20.1
but even when they exist the upload-artifact action seems to be ignoring them.
I agree that is better to always cache files/directories that are explicitly listed, even if they are hidden, rather than requiring users to set more attributes.
It would be great to log "Ignored hidden files .env, .bin/, and 9 others, use include-hidden-files: true if you want to include them.".
It would be great to log "Ignored hidden files
.env,.bin/, and 9 others, useinclude-hidden-files: trueif you want to include them.".
Agree. Just stumbled upon this on one of self-hosted runners with updated action, all the logs were quite misleading (and enabling debug didn't help at all).
Yes, a warning out or allowing specific paths in hidden directories, would be nice
my god, I thought I was going crazy and it was this bug. Please do something about it 😢 or tell me where I can get started to fix it.