1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-29 06:49:55 +02:00

Merge branch 'main' into neo-cache-service

This commit is contained in:
Bassem Dghaidi 2024-10-09 07:47:18 -07:00 committed by GitHub
commit 7cd4aa68d3
17 changed files with 191 additions and 127 deletions

View file

@ -137184,7 +137184,8 @@ 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());
// `cache-hit` is intentionally not set to `false` here to preserve existing behavior
// See https://github.com/actions/cache/issues/1466
if (failOnCacheMiss) {
throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`);
}