-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a 'clean-exclude' option (to avoid cleaning node_modules) #862
Comments
As further clarification, it is handy to have the git clean run, so you know the workspace matches the repo. But for some builds, we don't have control of where the build artifacts get dropped (e.g. with Unity, it produces a Library directory at the top level of the workspace). And those can be expensive to reproduce each time. So we'd like to have their deletion be controlled with a flag, like this. So we can sometimes do clean builds, and sometimes not. Use of a cache to handle that can be expensive, since the artifacts are so large. |
This can be easily done in gitlab by setting GIT_CLEAN_FLAGS to override the args passed to One way to simplify that I tried was to create a bash script action (we have others in the same repo, in the .github folder) that does the checkout and the git setup, and the clean, but all in one place. But this doesn't work, as you can't reference other actions in the same repo until you've done the checkout. So either you need a separate repo, or to do a lot of duplication. |
any update? |
@dapirian did you come up with a solution? |
Looking forward to have this feature! |
Currently, the checkout action will delete
node_modules
withgit clean -ffdx
. Since I use (mostly) persistent self-hosted runners, it's extremely inefficient to constantly be deleting and recreatingnode_modules
. It takes about a minute just to do the deletion ingit clean
and another 3 minutes to repopulatenode_modules
after that.It would be much much faster to be able to pass the exclude flag to clean, for example:
This could just be another argument to the action, so usage might be...
The text was updated successfully, but these errors were encountered: