mirror of
https://code.forgejo.org/actions/upload-artifact.git
synced 2025-05-20 16:04:46 +00:00
Add if-no-files-found option to merge action
This commit is contained in:
parent
4c0ff1c489
commit
03a6dff9d4
14 changed files with 202 additions and 44 deletions
50
dist/upload/index.js
vendored
50
dist/upload/index.js
vendored
|
@ -129393,6 +129393,32 @@ function regExpEscape (s) {
|
|||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 64068:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.NoFileOptions = void 0;
|
||||
var NoFileOptions;
|
||||
(function (NoFileOptions) {
|
||||
/**
|
||||
* Default. Output a warning but do not fail the action
|
||||
*/
|
||||
NoFileOptions["warn"] = "warn";
|
||||
/**
|
||||
* Fail the action with an error message
|
||||
*/
|
||||
NoFileOptions["error"] = "error";
|
||||
/**
|
||||
* Do not output any warnings or errors, the action does not fail
|
||||
*/
|
||||
NoFileOptions["ignore"] = "ignore";
|
||||
})(NoFileOptions = exports.NoFileOptions || (exports.NoFileOptions = {}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8725:
|
||||
|
@ -129630,7 +129656,7 @@ exports.uploadArtifact = uploadArtifact;
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.NoFileOptions = exports.Inputs = void 0;
|
||||
exports.Inputs = void 0;
|
||||
/* eslint-disable no-unused-vars */
|
||||
var Inputs;
|
||||
(function (Inputs) {
|
||||
|
@ -129641,21 +129667,6 @@ var Inputs;
|
|||
Inputs["CompressionLevel"] = "compression-level";
|
||||
Inputs["Overwrite"] = "overwrite";
|
||||
})(Inputs = exports.Inputs || (exports.Inputs = {}));
|
||||
var NoFileOptions;
|
||||
(function (NoFileOptions) {
|
||||
/**
|
||||
* Default. Output a warning but do not fail the action
|
||||
*/
|
||||
NoFileOptions["warn"] = "warn";
|
||||
/**
|
||||
* Fail the action with an error message
|
||||
*/
|
||||
NoFileOptions["error"] = "error";
|
||||
/**
|
||||
* Do not output any warnings or errors, the action does not fail
|
||||
*/
|
||||
NoFileOptions["ignore"] = "ignore";
|
||||
})(NoFileOptions = exports.NoFileOptions || (exports.NoFileOptions = {}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -129730,6 +129741,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
exports.getInputs = void 0;
|
||||
const core = __importStar(__nccwpck_require__(42186));
|
||||
const constants_1 = __nccwpck_require__(86154);
|
||||
const constants_2 = __nccwpck_require__(64068);
|
||||
/**
|
||||
* Helper to get all the inputs for the action
|
||||
*/
|
||||
|
@ -129738,9 +129750,9 @@ function getInputs() {
|
|||
const path = core.getInput(constants_1.Inputs.Path, { required: true });
|
||||
const overwrite = core.getBooleanInput(constants_1.Inputs.Overwrite);
|
||||
const ifNoFilesFound = core.getInput(constants_1.Inputs.IfNoFilesFound);
|
||||
const noFileBehavior = constants_1.NoFileOptions[ifNoFilesFound];
|
||||
const noFileBehavior = constants_2.NoFileOptions[ifNoFilesFound];
|
||||
if (!noFileBehavior) {
|
||||
core.setFailed(`Unrecognized ${constants_1.Inputs.IfNoFilesFound} input. Provided: ${ifNoFilesFound}. Available options: ${Object.keys(constants_1.NoFileOptions)}`);
|
||||
core.setFailed(`Unrecognized ${constants_1.Inputs.IfNoFilesFound} input. Provided: ${ifNoFilesFound}. Available options: ${Object.keys(constants_2.NoFileOptions)}`);
|
||||
}
|
||||
const inputs = {
|
||||
artifactName: name,
|
||||
|
@ -129815,7 +129827,7 @@ const core = __importStar(__nccwpck_require__(42186));
|
|||
const artifact_1 = __importStar(__nccwpck_require__(79450));
|
||||
const search_1 = __nccwpck_require__(8725);
|
||||
const input_helper_1 = __nccwpck_require__(67022);
|
||||
const constants_1 = __nccwpck_require__(86154);
|
||||
const constants_1 = __nccwpck_require__(64068);
|
||||
const upload_artifact_1 = __nccwpck_require__(56680);
|
||||
function deleteArtifactIfExists(artifactName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue