From 0eb8a70da9aee68d361ba1ce1b3fd0c52b48d868 Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Wed, 16 Feb 2022 12:21:52 -0600 Subject: [PATCH] npm run build --- dist/restore/index.js | 9 ++++++++- dist/save/index.js | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index c1071d4..b0a59e6 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -4610,6 +4610,7 @@ var Inputs; var Outputs; (function (Outputs) { Outputs["CacheHit"] = "cache-hit"; + Outputs["CacheRestored"] = "cache-restored"; })(Outputs = exports.Outputs || (exports.Outputs = {})); var State; (function (State) { @@ -36294,7 +36295,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0; +exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheRestoredOutput = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0; const core = __importStar(__webpack_require__(470)); const constants_1 = __webpack_require__(196); function isGhes() { @@ -36317,6 +36318,10 @@ function setCacheHitOutput(isCacheHit) { core.setOutput(constants_1.Outputs.CacheHit, isCacheHit.toString()); } exports.setCacheHitOutput = setCacheHitOutput; +function setCacheRestoredOutput(isCacheRestored) { + core.setOutput(constants_1.Outputs.CacheRestored, isCacheRestored.toString()); +} +exports.setCacheRestoredOutput = setCacheRestoredOutput; function setOutputAndState(key, cacheKey) { setCacheHitOutput(isExactKeyMatch(key, cacheKey)); // Store the matched cache key if it exists @@ -46779,6 +46784,7 @@ function run() { // Store the matched cache key utils.setCacheState(cacheKey); const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey); + utils.setCacheRestoredOutput(true); utils.setCacheHitOutput(isExactKeyMatch); core.info(`Cache restored from key: ${cacheKey}`); } @@ -46788,6 +46794,7 @@ function run() { } else { utils.logWarning(error.message); + utils.setCacheRestoredOutput(false); utils.setCacheHitOutput(false); } } diff --git a/dist/save/index.js b/dist/save/index.js index 4407422..47fc208 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -4610,6 +4610,7 @@ var Inputs; var Outputs; (function (Outputs) { Outputs["CacheHit"] = "cache-hit"; + Outputs["CacheRestored"] = "cache-restored"; })(Outputs = exports.Outputs || (exports.Outputs = {})); var State; (function (State) { @@ -36294,7 +36295,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0; +exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheRestoredOutput = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0; const core = __importStar(__webpack_require__(470)); const constants_1 = __webpack_require__(196); function isGhes() { @@ -36317,6 +36318,10 @@ function setCacheHitOutput(isCacheHit) { core.setOutput(constants_1.Outputs.CacheHit, isCacheHit.toString()); } exports.setCacheHitOutput = setCacheHitOutput; +function setCacheRestoredOutput(isCacheRestored) { + core.setOutput(constants_1.Outputs.CacheRestored, isCacheRestored.toString()); +} +exports.setCacheRestoredOutput = setCacheRestoredOutput; function setOutputAndState(key, cacheKey) { setCacheHitOutput(isExactKeyMatch(key, cacheKey)); // Store the matched cache key if it exists