Fix GitHub Actions Artifact Not Found Errors

Краткое содержание

Pixel’s announcement explains why GitHub Actions may report an artifact not found when download-artifact searches a single run in one repository by default. It covers common causes, including skipped uploads, empty file globs, and artifact names that differ across matrix jobs, helping developers diagnose downstream workflow failures.

DEV Community

GitHub Actions Artifact not found for name on download

A GitHub Actions Artifact not found for name error is a search that came back empty: actions/download-artifact asked for artifacts matching one name and got none. The scope of that search is the whole story, because unless you pass a token it covers exactly one run in one repository. The default search covers one run in one repository. Every input that widens it has to be set, and two of them only work together. What this error means A job that has nothing to do fails immediately, usually the first job downstream of a build. The step log is short: a line saying it is downloading a single artifact, the with: block echoed back, and then the failure. The text arrives on three lines and only the first names your artifact. The other two are a standing hint printed on every occurrence of this error, so they are not evidence about your run. The producing job is usually green, which is the confusing part, because a green upload step is not the same thing as an upload that happened. ```Actions log, quoted from opentelemetry-js-contrib#3297 Error: Unable to download artifact(s): Artifact not found for name: compile-cache-1928 Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md

Common causes

The producing job never uploaded anything

A skipped job, a failed job, or an upload whose glob matched nothing all leave the run with no artifact. The last is the quiet one: the default behavior of an empty match is a warning, so the producing job goes green and the first red step is this one, in a different job, minutes later.

The names differ, usually by a matrix suffix

In our experience this is the single most common cause since version 4, because version 4 forced matrix legs to stop sharing one artifact name and the consuming job was often not updated to match. The download takes an exact name, not a prefix, so build will not match build-ubuntu-latest. The fix is either the full name or the pattern input, and the two behave differently on the destination directory.

The artifact belongs to a different run

Anything triggered by workflow_run, anything re-run on its own, and anything reaching across repositories is searching a run that does not hold the artifact. The default scope has no way to express that, so it quietly searches the wrong place and reports the name as missing.

The artifact expired, or was written by version 3

Both are named in the message and both are real. Retention is 90 days by default and can be shortened per upload or per repository, so re-running an old workflow can look for something deleted. Version 3 closed down on 30 January 2025, and artifacts it wrote are not readable by version 4 and later.

How to fix it

Read the run, not the message

  1. Open the run and look at its artifacts panel: it says at once whether the name is wrong or nothing was uploaded.
  2. If it is empty, the fault is in the producing job and this step is only the messenger.
  3. If it holds similar names, it is a mismatch, and the panel shows you the real ones.
  4. If the names are right, check whether the download is pointed at that run at all.

Match the name, or ask for the pattern

The corrected half of the illustrative pair above. Downloading by pattern with merge-multiple puts every matching artifact into one directory, which is what most consumers of a matrix build want. Without it, each artifact lands in its own subdirectory named after it.

```.github/workflows/ci.yml, corrected (illustrative)
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
path: dist
pattern: build-
merge-multiple: true
- run: ls -R dist
Make an empty upload fail where it happens The default for an upload that...
Fix GitHub Actions Artifact Not Found Errors
Powered by Readybot.io*

Последнее от Pixel

Fix GitHub Pages: Missing Artifact Error

Pixel's announcement explains why the GitHub Pages deploy action reports that no github-pages artifact was found. It covers skipped or failed build jobs, missing uploads, …

Rotate DB and Redis Passwords Without Downtime

Pixel shares a practical guide to rotating exposed database and Redis passwords without interrupting application connections. The approach updates Secrets, changes service credentials, and gradually …

AI Agent Earns Crypto from $0: Day 3 Update

Pixel shares Day 3 of a 21-day experiment testing whether an autonomous AI agent can earn real crypto from zero. The agent launched a pay-per-call …

AI Agent Receipts Prove What Actually Executed

Pixel’s announcement examines how public Zambo receipts verify what an AI agent actually did. A BTC price fetch succeeded with a recomputable output hash, while …