@@ -58442,7 +58442,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
58442
58442
return (mod && mod.__esModule) ? mod : { "default": mod };
58443
58443
};
58444
58444
Object.defineProperty(exports, "__esModule", ({ value: true }));
58445
- exports.run = void 0;
58445
+ exports.cachePackages = exports. run = void 0;
58446
58446
const core = __importStar(__nccwpck_require__(2186));
58447
58447
const cache = __importStar(__nccwpck_require__(7799));
58448
58448
const fs_1 = __importDefault(__nccwpck_require__(7147));
@@ -58457,8 +58457,12 @@ process.on('uncaughtException', e => {
58457
58457
});
58458
58458
function run() {
58459
58459
return __awaiter(this, void 0, void 0, function* () {
58460
+ if (core.getState(constants_1.State.CacheRestoreOnly) === constants_1.State.True) {
58461
+ core.info('"cache-restore-only" set to true, skip caching');
58462
+ return;
58463
+ }
58460
58464
try {
58461
- yield cachePackages();
58465
+ yield exports. cachePackages();
58462
58466
}
58463
58467
catch (error) {
58464
58468
let message = 'Unknown error!';
@@ -58505,6 +58509,7 @@ const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
58505
58509
}
58506
58510
core.info(`Cache saved with the key: ${primaryKey}`);
58507
58511
});
58512
+ exports.cachePackages = cachePackages;
58508
58513
function logWarning(message) {
58509
58514
const warningPrefix = '[warning]';
58510
58515
core.info(`${warningPrefix}${message}`);
@@ -58622,6 +58627,8 @@ var State;
58622
58627
(function (State) {
58623
58628
State["CachePrimaryKey"] = "CACHE_KEY";
58624
58629
State["CacheMatchedKey"] = "CACHE_RESULT";
58630
+ State["CacheRestoreOnly"] = "CACHE_RESTORE_ONLY";
58631
+ State["True"] = "true";
58625
58632
})(State = exports.State || (exports.State = {}));
58626
58633
var Outputs;
58627
58634
(function (Outputs) {
0 commit comments