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.
Error: Provided artifact name input during validation is emptyCommon 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.
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os || 'default' }}
path: dist/Verify the source of the name
- Echo the name expression in a prior step to confirm it is non-empty.
- Make sure the producing step actually set the output you interpolate.
- 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.