cache/save does not support restore-keys
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to run a workflow that basically builds a project, and runs tests. Tests take a very long time, and could fail. So I'm trying to do this
- name: Restore Cache
uses: actions/cache/restore@v4
id: restore-cache
with:
path: thepath/
key: primary-key
restore-keys: |
restore-key1
restore-key2
- name: build the project (which populates the cache)
- name: Save cache
uses: actions/cache/save@v4
if: always() && steps.restore-cache.outputs.cache-hit != 'true'
with:
path: thepath/
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
# restore-keys: |
# restore-key1
# restore-key2
- name: Run long tests
It seems that actions/cache/save does not support restore-keys.
I'd like to tag my actions/cache/save cache with some restore keys for followup runs to be able to hit the restore keys. is there no way to do this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with save/action.yml, especially the inputs shown around lines 4-17, and trace how the save action handles cache configuration. Look for the related TypeScript entry point and tests covering save and restore behavior; done means the requested restore-key configuration is accepted and follow-up runs can use those keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100