Open higaski opened 3 weeks ago
I am seeing the same issue, with act version 0.2.63-9-g935e4c3
. The asset corruption seems to be size dependent:
Things work fine at 4M:
- run: dd if=/dev/urandom bs=1024 count=4096 of=urandom4M.bin
- uses: actions/upload-artifact@v4
with: { name: assets, path: 'urandom4M.bin' }
$ unzip /tmp/artifacts/1/assets/assets.zip
Archive: /tmp/artifacts/1/assets/assets.zip
inflating: urandom4M.bin
Things are broken at 8M:
- run: dd if=/dev/urandom bs=1024 count=8192 of=urandom8M.bin
- uses: actions/upload-artifact@v4
with: { name: assets, path: 'urandom8M.bin' }
$ unzip /tmp/artifacts/1/assets/assets.zip
Archive: /tmp/artifacts/1/assets/assets.zip
error [/tmp/artifacts/1/assets/assets.zip]: missing 8388608 bytes in zipfile
(attempting to process anyway)
error: invalid zip file with overlapped components (possible zip bomb)
$ ls -al /tmp/artifacts/1/assets/assets.zip
-rw-r--r-- 1 timj timj 2705 Jun 25 18:19 /tmp/artifacts/1/assets/assets.zip
The 8M asset file is obviously too small. Both results are repeatable reliably.
Bug report info
Command used with act
Describe issue
upload-artifact@v4 does produce corrupted archives in some cases. I have no idea why because the log does not hint any issue at all:
I've attached the archive produced from act and the original one from GitHub: corrupted.zip original.zip
The very same workflow works for me when using the older upload-artifact@v3.
I've also created a small test example where this is easily reproducible.
Link to GitHub repository
https://github.com/higaski/act_upload_artifact_v4
Workflow content