Skip to content
Latchkey

GitHub Actions "Conflict: an artifact with this name already exists" (v4)

In upload-artifact v4 each artifact name within a run is immutable and unique, so a second upload to the same name in the same run is a hard conflict rather than an overwrite.

What this error means

A second upload-artifact step fails with "Conflict: an artifact with this name already exists on the workflow run", common when matrix legs share one name.

github-actions
Error: Failed to CreateArtifact: Received non-retryable error: Conflict: an artifact with this name already exists on the workflow run

Common causes

Matrix legs uploading the same name

Multiple matrix jobs upload to one shared artifact name, and the second collides with the immutable first.

Re-upload to overwrite (v3 habit)

A workflow expects v3-style overwrite behavior, which v4 does not allow without the overwrite flag.

How to fix it

Make names unique or set overwrite

  1. Add a per-leg suffix to the artifact name (matrix.os, matrix.node).
  2. Set overwrite: true only when intentional replacement is desired.
  3. Merge multiple artifacts later with download-artifact merge-multiple.
.github/workflows/ci.yml
- uses: actions/upload-artifact@v4
  with:
    name: results-${{ matrix.os }}-${{ matrix.node }}
    path: results/

How to prevent it

  • Give each v4 upload a unique name per run.
  • Suffix artifact names with matrix dimensions.
  • Reserve overwrite: true for deliberate replacement.

Frequently asked questions

What causes ""Artifact name conflict""?
Multiple matrix jobs upload to one shared artifact name, and the second collides with the immutable first.
How do I fix "Artifact name conflict"?
Make names unique or set overwrite

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card