GitHub Actions download-artifact "Unable to find any artifacts"
download-artifact with no name tries to fetch all artifacts from the current run and finds none, because nothing was uploaded in this run or the artifacts live in a different run.
What this error means
The download step fails with "Unable to find any artifacts for the associated workflow" even though you expected uploads to be present.
Error: Unable to find any artifacts for the associated workflowDiagnose it: was the cache hit, and was it the right one?
Cache bugs split into three shapes and they need different fixes: the cache never saved, it saved but the key never matches on restore, or it restored a stale entry through a restore-keys prefix and is now poisoning the build. The step output tells you which one you have.
- uses: actions/cache@v4
id: cache
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: What happened
run: |
echo "exact hit: ${{ steps.cache.outputs.cache-hit }}"
echo "key used: ${{ steps.cache.outputs.cache-matched-key }}"Common causes
No artifacts uploaded in this run
The producing job did not upload (failed, skipped, or empty), so the run has no artifacts to fetch.
Downloading from the wrong run
The artifacts belong to a different run/workflow and cross-run parameters were not supplied.
How to fix it
Ensure artifacts exist and target the right run
- Confirm at least one upload-artifact step succeeded in this run.
- Order the consumer after the producer with needs:.
- For cross-workflow downloads, pass run-id, github-token, and repository.
- uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}Cache limits that produce confusing failures
- Repository cache is capped at 10 GB. Past that, GitHub evicts least-recently-used entries, so a large cache can silently stop persisting.
- Caches are scoped by branch. A cache written on a feature branch is not visible to another feature branch, only to its base and its own descendants.
- An entry not read for 7 days is evicted, so a rarely-run workflow effectively never has a warm cache.
- Restoring a cache built for a different tool version is worse than a cold start, because you get a corrupted tree instead of a clean install. Always include the tool version in the key.
How to prevent it
- Verify uploads occur before any download.
- Sequence producer and consumer jobs explicitly.
- Provide cross-run parameters when sourcing from another run.