1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-06-01 20:30:22 +02:00

Add option to skip uploading of cache

This commit is contained in:
Edoardo Pirovano 2022-08-09 15:11:47 +01:00
parent f4278025ab
commit 015084af58
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
5 changed files with 17 additions and 1 deletions

View file

@ -4616,6 +4616,7 @@ var Inputs;
Inputs["Path"] = "path";
Inputs["RestoreKeys"] = "restore-keys";
Inputs["UploadChunkSize"] = "upload-chunk-size";
Inputs["SkipUpload"] = "skip-upload";
})(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs;
(function (Outputs) {

4
dist/save/index.js vendored
View file

@ -4616,6 +4616,7 @@ var Inputs;
Inputs["Path"] = "path";
Inputs["RestoreKeys"] = "restore-keys";
Inputs["UploadChunkSize"] = "upload-chunk-size";
Inputs["SkipUpload"] = "skip-upload";
})(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs;
(function (Outputs) {
@ -46795,6 +46796,9 @@ function run() {
core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
return;
}
if (core.getBooleanInput(constants_1.Inputs.SkipUpload)) {
core.info(`Skipping upload of cache since the skip-upload input was set.`);
}
const cachePaths = utils.getInputAsArray(constants_1.Inputs.Path, {
required: true
});