You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this job finishes any other job that runs on the same machine using normal checkout preserves the sparse option.
- uses: actions/checkout@v4
We run into this issue when running multiple jobs while only one of those have sparse checkout. All jobs are from the same repository.
In the logs we see that the second job executes git sparse-checkout disable (during checkout), but this command does not seem to take effect. We still see the sparseCheckout = true option if we look inside the .git/config of the repo.
The text was updated successfully, but these errors were encountered:
I've just hit the same issue on the project I'm working on. Had to disable the sparse-checkout manually and pull the repo once more to fix it.
One workaround-ish suggestion I would share — make sure to specify path when pulling with sparse-checkout.
When path is not specified, the runner simply pulls the repo in its _work directory. And if you checkout over and over again, the runner is reusing that repository. This is fine (and maybe even desirable) when pulling the entire repo.
But if are using sparse-checkout, it's likely that you want to save on downloads. Also it's not likely that you are interested in reusing the repo. By manually specifying the path for the sparsely-checked-out repo I avoid breaking the repo in the working directory of the runner. Awkward, but works.
When we use sparsecheckout in some job, the next jobs continue to use sparscheckout.
After this job finishes any other job that runs on the same machine using normal checkout preserves the sparse option.
We run into this issue when running multiple jobs while only one of those have sparse checkout. All jobs are from the same repository.
In the logs we see that the second job executes git sparse-checkout disable (during checkout), but this command does not seem to take effect. We still see the sparseCheckout = true option if we look inside the .git/config of the repo.
The text was updated successfully, but these errors were encountered: