On the first run of a workflow (or when the artifact cache is missing), the Restore dependency version cache step in setup-bakery attempts to download a non-existent artifact, producing error messages like:
Unable to download artifact(s): Artifact not found for name: bakery-deps-*
Please ensure that your artifact is not expired and the artifact ...
Although the workflow continues due to continue-on-error: true, these error messages appear as failed steps in job logs, creating noise and confusion.
Expected behavior
The cache restore should fail gracefully on first run without producing visible error messages, while still showing actual retrieval failures (permissions, expiration, network issues).
Possible approach
Query the GitHub API in a bash step to check if the expected cache artifact exists before attempting to download it, conditionally running the download-artifact action only when the artifact exists.
On the first run of a workflow (or when the artifact cache is missing), the
Restore dependency version cachestep insetup-bakeryattempts to download a non-existent artifact, producing error messages like:Although the workflow continues due to
continue-on-error: true, these error messages appear as failed steps in job logs, creating noise and confusion.Expected behavior
The cache restore should fail gracefully on first run without producing visible error messages, while still showing actual retrieval failures (permissions, expiration, network issues).
Possible approach
Query the GitHub API in a bash step to check if the expected cache artifact exists before attempting to download it, conditionally running the
download-artifactaction only when the artifact exists.