actions / actions/cache

[Feature] Support `if-no-files-found` like `actions/upload-artifact`

Open
#1,161 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Hi, I would like to have an option if-no-files-found like on actions/upload-artifact

https://github.com/actions/upload-artifact/blob/65d862660abb392b8c4a3d1195a2108db131dd05/action.yml#L11-L19

The benefit for me that would allow me to make actions/cache & actions/cache/save fail when the provided paths match with no files.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the referenced actions/upload-artifact action.yml lines 11-19 with the inputs and behavior of actions/cache and actions/cache/save. Define how the option should handle paths matching no files, then add coverage for the requested behavior. Done means both cache actions expose and honor the option consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.