1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-23 13:06:17 +02:00

Fix cache-hit output when cache missed (#1404)

* fix: cache-hit output

* fix: Output chache hit timing

* fix: Output chache hit timing

---------

Co-authored-by: Josh Gross <joshmgross@github.com>
This commit is contained in:
r4mimu 2024-08-01 01:56:48 +09:00 committed by GitHub
parent e47d9f9ec8
commit 40c3b67b29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 3 deletions

View file

@ -59415,6 +59415,7 @@ function restoreImpl(stateProvider, earlyExit) {
const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly);
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive);
if (!cacheKey) {
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
if (failOnCacheMiss) {
throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`);
}