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

Cache LFS files in usages of actions/checkout #126

Closed
JakobEdding opened this issue Aug 2, 2023 · 3 comments · Fixed by #130
Closed

Cache LFS files in usages of actions/checkout #126

JakobEdding opened this issue Aug 2, 2023 · 3 comments · Fixed by #130
Assignees
Labels
enhancement New feature or request

Comments

@JakobEdding
Copy link
Member

JakobEdding commented Aug 2, 2023

GitHub has a minimal free quota for LFS https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage

It seems that actions/checkout does not cache LFS files between workflow runs in a repo when the action is used with lfs: true so that the quota is affected by every run: actions/checkout#165

Consider using https://github.com/nschloe/action-cached-lfs-checkout which is able to cache LFS files.

@JakobEdding JakobEdding added the enhancement New feature or request label Aug 2, 2023
@yannick-roeder
Copy link
Member

yannick-roeder commented Aug 17, 2023

Edge cases and ideal behaviour

  • File gets deleted -> Delete file also gets deleted from cache
  • File gets added -> Newly added file gets pulled from repo and added to cache
  • File name changes -> Renamed file does not need to be pulled from repo again and gets renamed in cache
  • Data in file changes -> File with changed contents gets pulled from repo and added to the cache

@MichaelKora
Copy link
Contributor

the gihtub action cache support caching

@JakobEdding
Copy link
Member Author

JakobEdding commented Aug 21, 2023

As far as I can tell, some logic around the pure cache action is necessary to cache files and compute whether something is a cache hit or miss. This is what is provided by the action I linked (or possibly even better what this comment does because it uses restore-keys). So I think it would be good to take a closer look at these two options which both use actions/cache internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants