GitHub Actions: "No files were found with the provided path"
actions/upload-artifact searched for the path you gave and found no files, so it uploaded nothing. By default this is only a warning (if-no-files-found: warn) and the step passes, so the problem shows up later, when a person or another job looks for the artifact.
What it looks like
No files were found with the provided path: test-results/. No artifacts will be uploaded.
The path is printed as you wrote it. This one appeared on every passing end-to-end shard in canopycms #666 (see 3 below).
1. The path is read from the workspace, not from working-directory
GitHub's documentation says defaults.run sets the shell and working directory "for all run steps". A uses: step such as upload-artifact is not one, so it looks for path from the workspace root:
defaults:
run:
working-directory: frontend
steps:
- run: npm run build # runs in frontend/, writes frontend/dist
- uses: actions/upload-artifact@v7
with:
name: dist
path: frontend/dist # not dist
2. A name that starts with a dot
- Since v4.4.0 (August 30, 2024), files and folders whose names start with a dot are skipped unless
include-hidden-files: trueis set. The release note says this "reduces the risk that credentials are accidentally uploaded into artifacts." - A path that is itself hidden finds nothing: in doodle-shooter #12 the end-to-end failure traces in
e2e/.resultswere never uploaded. - A hidden folder inside the path is left out without a warning: in workshop #52 a release artifact lacked the build's hidden files, and the staging deployment then failed checking for the missing Vite manifest.
Turn it on for that upload only, with a path that does not take in the checkout's .git folder: actions/checkout stores its token in the local git config unless persist-credentials: false is set.
- uses: actions/upload-artifact@v7
with:
name: e2e-results
path: e2e/.results
include-hidden-files: true
3. Nothing made the files
- The tool writes the folder only sometimes. In canopycms, Playwright in CI writes
test-results/only when a test leaves traces or screenshots, and the upload ran underif: always(), so every passing shard warned. Useif: failure()for failure-only files, orif-no-files-found: ignore. - The build failed without failing the step. In VoltAir #79 the upload found no
bin/VoltAir.apk; the fix (VoltAir #80) made the build's failed commands fail the step, and set the Java version the old toolchain needs. - The files were made in another job. Each job runs on a fresh runner, so upload in the job that built them.
To see what is there, list it in the step before the upload:
- run: |
ls -la frontend/dist
find . -name '*.apk' -not -path './.git/*'
warn, error or ignore
if-no-files-found: errorfails the step. Use it when the artifact is the point of the job, such as a release build; VoltAir's workflow does.if-no-files-found: ignorelogs the same line as plain output, for files that exist only sometimes.- The default,
warn, puts the line in the run's annotations and passes.
Telling it apart
- A later
actions/download-artifactstep failing with "Unable to download artifact(s)" because the artifact was not found is often this warning, one job earlier. - "Artifact storage quota has been hit": the files were found, but the account's artifact storage is full ("Artifact storage quota has been hit").
- Caches are separate from artifacts: "Cache not found for input keys" is
actions/cache("Cache not found for input keys").
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
GitHub and GitHub Actions are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc. or JetBrains.
More: "Artifact storage quota has been hit" · "Cache not found for input keys" · The "Unexpected input(s)" warning · GitHub Actions plugins for IntelliJ IDEA compared · 日本語