Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to restore cache only (for PRs) #641

Closed
ForsakenHarmony opened this issue Jan 6, 2023 · 3 comments · Fixed by #851
Closed

Add option to restore cache only (for PRs) #641

ForsakenHarmony opened this issue Jan 6, 2023 · 3 comments · Fixed by #851

Comments

@ForsakenHarmony
Copy link

ForsakenHarmony commented Jan 6, 2023

Your feature request related to a problem? Please describe.

GitHub has a 10 GB limit for actions caches, this action alone is using 130 MB for us, it would be nice to not also get another 130 MB for each opened PR.

Describe the solution you'd like.

Add a save-cache option to be able to still restore cache (e.g. from main), but not save a new cache entry

Additional context.

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

@bombsimon
Copy link
Member

Is the option skip-cache not working for you? From the docs:

# Optional: if set to true then the all caching functionality will be complete disabled,
#           takes precedence over all other caching options.
# skip-cache: true

@ForsakenHarmony
Copy link
Author

@bombsimon I want to still restore the cache, but not save it

@ForsakenHarmony ForsakenHarmony changed the title Add option to not save cache (for PRs) Add option to restore cache only (for PRs) Jan 10, 2023
@krhubert
Copy link

krhubert commented Jul 7, 2023

This option would be great in order to reduce total cache size (on GH it's limited to 10GB).

Golang cache can take between 300-500 MB easily and because of that repo can quickly hit cache storage limit. One of possible solution to this problem is to save cache only on the main branch and use read-only mode for non main branches.

navijation added a commit to navijation/golangci-lint-action that referenced this issue Sep 13, 2023
ldez pushed a commit to navijation/golangci-lint-action that referenced this issue Apr 25, 2024
@ldez ldez closed this as completed in #851 Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants