@@ -58442,7 +58442,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5844258442 return (mod && mod.__esModule) ? mod : { "default": mod };
5844358443};
5844458444Object.defineProperty(exports, "__esModule", ({ value: true }));
58445- exports.run = void 0;
58445+ exports.cachePackages = exports. run = void 0;
5844658446const core = __importStar(__nccwpck_require__(2186));
5844758447const cache = __importStar(__nccwpck_require__(7799));
5844858448const fs_1 = __importDefault(__nccwpck_require__(7147));
@@ -58457,8 +58457,12 @@ process.on('uncaughtException', e => {
5845758457});
5845858458function run() {
5845958459 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+ }
5846058464 try {
58461- yield cachePackages();
58465+ yield exports. cachePackages();
5846258466 }
5846358467 catch (error) {
5846458468 let message = 'Unknown error!';
@@ -58505,6 +58509,7 @@ const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
5850558509 }
5850658510 core.info(`Cache saved with the key: ${primaryKey}`);
5850758511});
58512+ exports.cachePackages = cachePackages;
5850858513function logWarning(message) {
5850958514 const warningPrefix = '[warning]';
5851058515 core.info(`${warningPrefix}${message}`);
@@ -58622,6 +58627,8 @@ var State;
5862258627(function (State) {
5862358628 State["CachePrimaryKey"] = "CACHE_KEY";
5862458629 State["CacheMatchedKey"] = "CACHE_RESULT";
58630+ State["CacheRestoreOnly"] = "CACHE_RESTORE_ONLY";
58631+ State["True"] = "true";
5862558632})(State = exports.State || (exports.State = {}));
5862658633var Outputs;
5862758634(function (Outputs) {
0 commit comments