bahmutov / npm-install

GitHub Action for install npm dependencies with caching without any configuration
https://github.com/marketplace/actions/npm-or-yarn-install-with-caching
652 stars 71 forks source link

Ability to swap out actions/cache for the faster alternative buildjet/cache #183

Open Jamesking56 opened 1 year ago

Jamesking56 commented 1 year ago

Background/problem

GitHub Actions cache has a number of issues surrounding performance when used on self-hosted runners. GitHub has failed to address this on numerous occassions so BuildJet created their own free cache alternative with double the amount of storage and much faster performance. It would be nice if we could use this in ramsey/composer-install, providing an option to specify which cache we wanted to use.

Proposal/solution

I propose that we add a new option which specifies which cache we would like to use and have this shared action then use the cache specified. We can leave the default to GitHub to keep backward compatibility.

Additional context

https://buildjet.com/for-github-actions/blog/launch-buildjet-cache