bakdata / ci-templates

Collection of reusable workflows and composite actions for Github
MIT License
4 stars 1 forks source link

Cache LFS files in usages of `actions/checkout` #126

Closed JakobEdding closed 10 months ago

JakobEdding commented 11 months ago

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: https://github.com/actions/checkout/issues/165

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

yannick-roeder commented 11 months ago

Edge cases and ideal behaviour

MichaelKora commented 11 months ago

the gihtub action cache support caching

JakobEdding commented 11 months ago

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.