-
Notifications
You must be signed in to change notification settings - Fork 83
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
Allow excluding files from caching #203
Comments
This may not be too difficult to implement, though I'm not sure how much of an issue this is for others. Is there any specific reason certain files or folders may want to be omitted? Clarifying the justification for why this is a good feature to add to |
Generally, the same reason why both blacklists and whitelists exist: sometimes you want everything except for one file, and sometimes you want nothing except for one file. Solving both with only one solution is tedious or even impossible. More concretely, I have a folder I want to cache but there's another folder inside it that I don't want to cache. The reason for that is that each is built with a different command so caching both at the same time would mean I have to build both if one of them needs rebuilding (kinda invalidating the caching step). Even more concretely, I rewrote the GitHub Actions template for publishing Dendron, you can see the original here: https://wiki.dendron.so/notes/FnK2ws6w1uaS1YzBUY3BR/#steps---setup-github-actions There you can see two caching steps: "Restore Node modules cache" and "Restore Next cache". |
Hmm I see. We've just recently added double-star glob support for I'll try my hand at implementing this later this afternoon as it shouldn't be too difficult. I may have to add single-star glob matching as well, which should be much more straightforward once #209 is merged. For clarity, this would allow flexible usage of the exclusionary rules. Let me know if this is something you do or do not want. It may be a bit difficult to add exclusions of specific files due to the simplistic way the mount function works as part of the plugin, but for simple directory exclusions this should be an easy change to make. Will get back to you and let you know if this will be too challenging to be targeted for the v1.4.0 release of |
Nice, thank you for considering it! |
No problem @KucharczykL Seems like this will take a bit more effort than I had time for today. I'll keep you posted but will try to get this done by this week depending on what comes up. |
Hi @bdebyl, any luck with this? 🙂 |
Is your feature request related to a problem? Please describe.
I have a folder that I want to cache but not all of its subfolders and files.
Describe the solution you'd like
I would like to specify which folders or files not to cache.
Describe alternatives you've considered
I can probably manually delete the files in a separate step just before rebuilding the cache.
Additional context
GitHub Actions support this using the
!
character to indicate excluded files or folders. See https://github.com/actions/cache#v2The text was updated successfully, but these errors were encountered: