Add option to restore cache only

Open
#316 28 comments 32 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

@dsame is already working on this.

Since Jul 25, 2023.

  • #400 by @dsame — open

Assessment

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

Research direction

Start by reviewing linked pull request #400 and the existing cache behavior in setup-go. Use the issue's restore-only requirement as the acceptance criterion: caches should be restorable without being saved, while normal caching remains available. Check the pull request's validation results before making further changes.

Written by the indexing model from the issue text.

Description

feature request

Description:
It would be nice to have the option to restore only and not save.

Justification:
In bigger repos, it's easy to hit the 10gb cache limit. Not caching in PRs can help with this.
Right now, I have to manually delete caches to help keep the caches on main alive.

Are you willing to submit a PR?

References

https://github.com/actions/toolkit/issues/1308
https://github.com/Swatinem/rust-cache/issues/95 (has a save-if option https://github.com/Swatinem/rust-cache#example-usage)

Dominant language
TypeScript
Stars
1.8k
Forks
684
Avg merge
12d 23h
Merged PRs (30d)
3

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from actions/setup-go

All issues in actions/setup-go

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.