Closed chrispyles closed 9 months ago
You can manually remove cache entries via GitHub's UI.
I don't think we want to be in the business of validating external files generally speaking but maybe we can support -r requirements.txt
.
Otherwise you can add the hash of your file to cache-downloads-key
Thanks for pointing out that the cache can be deleted manually, @jonashaag; that's unblocked my PR. +1 to supporting -r requirements.txt
.
You can already specify additional cache constraints by something like this:
cache-environment-key: micromamba-env-${{ hashFiles('requirements.txt', 'other-relevant-files') }}
I don't see much value from adding a cache-files
option since this is probably not a very common use case and there already is the above mentioned way to solve it.
In ucbds-infra/otter-grader#684, I am adding two new requirements for the package in the repo's
requirements.txt
file. This file is referenced by theenvironment.yml
file. Our action is configured to cache the mamba environment but is currently failing because the new requirements were added torequirements.txt
butenvironment.yml
was not updated, so the setup-micromamba action assumes nothing has changed and uses the cached image.It would be nice to be able to specify that the
environment.yml
depends on other files so that hashes of those files can also be used in the cache key, e.g.Alternatively, is there a way to manually invalidate the cache for force micromamba to rebuild it?