Add the ability to only check for a cache key without restoring
Overview
In some situations it helps to have a way to only check that a cache key exists without spending the extra time to download the cache: for example when you have a job that handles building and a separate job that handles running tests. The job that builds is a NOOP when the cache exists but it needs to verify first. If the build is pretty large that adds time spent downloading a payload that gets ignored and then downloaded again in the other job.
Fixes: #321
❗ Until this gets merged
This can be used today by referencing bowd/cache@v3 in the actions instead of actions/cache@v2
The input is only-check-key. If that is set to true it will skip the downloading but output the same cache-hit as the normal flow.
Also unrelated to this CI is failing because of this: https://github.com/actions/toolkit/pull/589
Hey @bowd – am relying on the only-check-key in your bowd/cache@v3 action and just noticed you closed this PR, curious if there was any particular reason? Did you find an alternative solution?
If anyone else stumbles across this, https://github.com/marketplace/actions/cache now has lookup-only.