Skip to content

nschloe/action-cached-lfs-checkout

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub action: Cached LFS checkout

Storing (large) binary files in Git trees is not recommended because any change to the file will result in a re-upload of the entire file when pushing, increasing the size of the Git repository. When updating a 100 MB file 100 times, your repository will be 10 GB in size!

As a remedy, there is Git LFS which stores certain files only as pointers in the Git tree, downloading the actual data from somewhere else when pulling. The repository size remains small.

GitHub applies some fees when the total amount of LFS downloads surpasses 1GB. Unfortunately, even gh-actions runs, when used with

- name: Checkout code
  uses: actions/checkout@v2
  with:
    lfs: true

count towards that limit. To cache the LFS downloads, you can instead use this action. Simply replace the above by

- name: Checkout code
  uses: nschloe/action-cached-lfs-checkout@v1
  # Use these to explicitly include/exclude files:
  # with:
  #   include: "*"
  #   exclude: ""

Check it out on the GitHub Marketplace!

Further reading

License

The scripts and documentation in this project are released under the MIT License.

About

GitHub checkout action with LFS files pulled from cache

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages