mirror of
https://code.forgejo.org/actions/cache.git
synced 2026-02-11 05:04:31 +00:00
Merge b15dd68d6e into 8b402f58fb
This commit is contained in:
commit
3a45ddd4ad
15 changed files with 1085 additions and 583 deletions
314
dist/save/index.js
vendored
314
dist/save/index.js
vendored
|
|
@ -44051,6 +44051,7 @@ var Inputs;
|
|||
Inputs["Path"] = "path";
|
||||
Inputs["RestoreKeys"] = "restore-keys";
|
||||
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
||||
Inputs["CompressionLevel"] = "compression-level";
|
||||
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
||||
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
|
||||
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
||||
|
|
@ -44167,6 +44168,10 @@ function saveImpl(stateProvider) {
|
|||
required: true
|
||||
});
|
||||
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
|
||||
const compressionLevel = utils.getCompressionLevel(constants_1.Inputs.CompressionLevel);
|
||||
if (compressionLevel !== undefined) {
|
||||
utils.setCompressionLevel(compressionLevel);
|
||||
}
|
||||
cacheId = yield cache.saveCache(cachePaths, primaryKey, { uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize) }, enableCrossOsArchive);
|
||||
if (cacheId != -1) {
|
||||
core.info(`Cache saved with key: ${primaryKey}`);
|
||||
|
|
@ -44357,6 +44362,8 @@ exports.logWarning = logWarning;
|
|||
exports.isValidEvent = isValidEvent;
|
||||
exports.getInputAsArray = getInputAsArray;
|
||||
exports.getInputAsInt = getInputAsInt;
|
||||
exports.getCompressionLevel = getCompressionLevel;
|
||||
exports.setCompressionLevel = setCompressionLevel;
|
||||
exports.getInputAsBool = getInputAsBool;
|
||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||
const cache = __importStar(__nccwpck_require__(5116));
|
||||
|
|
@ -44399,6 +44406,25 @@ function getInputAsInt(name, options) {
|
|||
}
|
||||
return value;
|
||||
}
|
||||
function getCompressionLevel(name, options) {
|
||||
const rawValue = core.getInput(name, options);
|
||||
if (rawValue === "") {
|
||||
return undefined;
|
||||
}
|
||||
const compressionLevel = parseInt(rawValue, 10);
|
||||
if (isNaN(compressionLevel) ||
|
||||
compressionLevel < 0 ||
|
||||
compressionLevel > 9) {
|
||||
logWarning(`Invalid compression-level provided: ${rawValue}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
|
||||
return undefined;
|
||||
}
|
||||
return compressionLevel;
|
||||
}
|
||||
function setCompressionLevel(compressionLevel) {
|
||||
const level = compressionLevel.toString();
|
||||
process.env["ZSTD_CLEVEL"] = level;
|
||||
process.env["GZIP"] = `-${level}`;
|
||||
}
|
||||
function getInputAsBool(name, options) {
|
||||
const result = core.getInput(name, options);
|
||||
return result.toLowerCase() === "true";
|
||||
|
|
@ -59309,6 +59335,24 @@ exports.UserDelegationKeyCredential = UserDelegationKeyCredential;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83627:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KnownEncryptionAlgorithmType = void 0;
|
||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||
var KnownEncryptionAlgorithmType;
|
||||
(function (KnownEncryptionAlgorithmType) {
|
||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||
//# sourceMappingURL=generatedModels.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 30247:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
|
|
@ -69581,6 +69625,132 @@ exports.listType = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56635:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=appendBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68355:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17188:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blockBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15337:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=container.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82354:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const tslib_1 = __nccwpck_require__(61860);
|
||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14400:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=pageBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26865:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=service.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 40535:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
|
|
@ -72786,132 +72956,6 @@ const filterBlobsOperationSpec = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56635:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=appendBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68355:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17188:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blockBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15337:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=container.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82354:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const tslib_1 = __nccwpck_require__(61860);
|
||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14400:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=pageBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26865:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=service.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5313:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
|
|
@ -72985,24 +73029,6 @@ exports.StorageClient = StorageClient;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83627:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KnownEncryptionAlgorithmType = void 0;
|
||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||
var KnownEncryptionAlgorithmType;
|
||||
(function (KnownEncryptionAlgorithmType) {
|
||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||
//# sourceMappingURL=generatedModels.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 71400:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue