mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 08:43:55 +08:00
npm run build
This commit is contained in:
parent
54f20c8e9b
commit
0eb8a70da9
2 changed files with 14 additions and 2 deletions
9
dist/restore/index.js
vendored
9
dist/restore/index.js
vendored
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
7
dist/save/index.js
vendored
7
dist/save/index.js
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue