Error uploading artifact "EISDIR: illegal operation on a directory, read."
See original GitHub issueDescribe the bug
When I create a release using the artifacts
parameter, the file does not get added to the release and reports the following error for each one:
Failed to upload artifact [filename]. EISDIR: illegal operation on a directory, read.
To Reproduce
My build can be seen here. Not sure if it is specific to using actions/upload-artifact
, the job itself is fairly simple:
release:
runs-on: ubuntu-latest
needs:
- exports
- exports-macos
steps:
- uses: actions/download-artifact@v2
with:
path: build/
- run: |
version=${GITHUB_REF/refs\/tags\/v/}
echo "version=${version}" >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
with:
name: Release v${{env.version}}
tag: ${{env.version}}
draft: true # for testing
allowUpdates: true
artifacts: build/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
Expected behavior File added to the release
Screenshots
Example Github Workflow run
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
EISDIR: illegal operation on a directory, read #35 - GitHub
When trying to upload the files to the release I get an error: EISDIR: illegal operation on a directory, read .
Read more >NPM stuck giving the same error EISDIR: Illegal operation on ...
This means that NPM is trying to do something to a file but it is a directory. In your case, NPM is trying...
Read more >eisdir: illegal operation on a directory - You.com
npm command - Error: EISDIR: illegal operation on a directory, read ... Run actions/upload-artifact@v2 With the provided path, there will be 43 files ......
Read more >cypress-io/cypress - Gitter
getting this on CI when I've specified not to upload passing tests. ```We encountered an unexpected ... Error: EISDIR: illegal operation on a...
Read more >DeleteArtifacts job fails with Unhandled: Failed find: EISDIR
We have a build definition that publishes file artifacts to an unc fileshare ... #[error]Unhandled: Failed find: EISDIR: illegal operation on a directory, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Your theory was completely correct, sorry for polluting this space. Running both with and without the path options results in directories:
How I read the documentation I thought the no path option would not, but didn’t read close enough. If I find a solution, I’ll update this comment just in case someone stumbles on this issue.
EDIT
Looks like the correct way to do this is with named artifacts, so if you have a matrix and it builds a different filename for each, you can do
and on the other side
All the files will then be placed at the root. The documentation says this regarding not using the
path
option, but was not clear about it needing to use thename
Ahh, thank you for the extra details. I’ll try that.