Skip to content
Latchkey

GitHub Actions "Provided artifact name input during validation is empty"

The artifact action received an empty name. The name was built from an expression or variable that resolved to nothing - an unset matrix value, a missing output, or a typo in the context reference.

What this error means

An upload-artifact or download-artifact step fails validation with "Provided artifact name input during validation is empty", because the computed name string was blank.

Actions log
Error: Provided artifact name input during validation is empty

Common causes

Name expression resolved to empty

A name like build-${{ steps.x.outputs.tag }} is empty when that output was never set, leaving the whole name (or its dynamic part) blank.

Unset matrix or env value in the name

Referencing matrix.<key> or env.VAR that is not present in this combination yields an empty segment, and an all-empty name fails validation.

How to fix it

Ensure the name resolves to a value

Provide a static fallback or confirm the dynamic part is always populated.

.github/workflows/ci.yml
- uses: actions/upload-artifact@v4
  with:
    name: build-${{ matrix.os || 'default' }}
    path: dist/

Verify the source of the name

  1. Echo the name expression in a prior step to confirm it is non-empty.
  2. Make sure the producing step actually set the output you interpolate.
  3. Default any optional matrix/env segment so the name is never blank.

How to prevent it

  • Always include a non-empty static segment in artifact names.
  • Confirm interpolated outputs/matrix values are set before use.
  • Echo computed names when debugging artifact steps.

Related guides

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