This repository was archived by the owner on Jun 9, 2023. It is now read-only.
Add support for sparse-checkout #1
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context:
Monorepo sometimes can be challenging mainly when having a huge base of code. A lot of people have encounter situation where they don't need to fetch everything inside the repository, with this new option anyone will be able to make
sparse-checkoutinside github action quite simple!Features:
sparse-checkoutoptionsparse-checkoutREADME.mdwithsparse-checkoutoption and examplesUsage:
Fetch only the root files
Fetch only the root files and
.githubandsrcfolderImplementation
In order to make
sparase-checkoutmuch useful I have added to thegit fetchthe possibility to add a filter in order to use--filter='blob:none'.With this update we will make sure that when the fetch is done no blob of the repository will be downloaded (this filter will be done only when
sparse-checkoutis set), instead the blobs will be downloaded when making thegit checkoutafter having thesparse-checkoutconfigured.Here you can find the article that I have used to guide me to make the implementation.
Related Issues