Skip to content
Latchkey

actions/download-artifact "Artifact not found for name" in CI

download-artifact queries the current run (by default) for an artifact with the given name and fails if none matches. The name is misspelled, the producing job has not finished, or the upload happened in a different run than the one being downloaded from.

What this error means

The download step fails with "Error: Unable to download artifact(s): Artifact not found for name: <name>", even though an upload step exists somewhere in the workflow.

download-artifact
Error: Unable to download artifact(s): Artifact not found for name: build-output
        Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.

Common causes

Name mismatch between upload and download

The download name does not exactly match the uploaded name (a typo, a matrix suffix the producer added, or different casing).

Missing dependency or wrong run scope

The downloading job did not needs: the producing job, so it ran first, or the artifact lives in a different workflow run that needs a cross-run download.

How to fix it

Match names and add a needs dependency

  1. Make the download name identical to the upload name.
  2. Add needs: <producer-job> so the producer finishes first.
  3. Re-run so the artifact exists in the run before download.
.github/workflows/ci.yml
download:
  needs: build
  steps:
    - uses: actions/download-artifact@v4
      with:
        name: build-output
        path: dist/

Download by pattern when names are dynamic

If producers add matrix suffixes, omit name and use pattern: with merge-multiple: true to pull all matching artifacts at once.

.github/workflows/ci.yml
- uses: actions/download-artifact@v4
  with:
    pattern: build-output-*
    merge-multiple: true

How to prevent it

  • Keep upload and download names identical (or use patterns).
  • Declare needs: so producers complete before consumers.
  • Remember v4 artifacts are scoped to a run unless you download cross-run.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →