This commit is contained in:
Josh Soref 2025-03-19 11:48:17 +09:00 committed by GitHub
commit b5a08e5120
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 93 additions and 12 deletions

21
dist/index.js vendored
View file

@ -118710,6 +118710,7 @@ var Inputs;
Inputs["RunID"] = "run-id";
Inputs["Pattern"] = "pattern";
Inputs["MergeMultiple"] = "merge-multiple";
Inputs["WarnOnFailure"] = "warn-on-failure";
})(Inputs || (exports.Inputs = Inputs = {}));
var Outputs;
(function (Outputs) {
@ -118774,7 +118775,7 @@ const chunk = (arr, n) => arr.reduce((acc, cur, i) => {
return acc;
}, []);
exports.chunk = chunk;
function run() {
function run(flags) {
return __awaiter(this, void 0, void 0, function* () {
const inputs = {
name: core.getInput(constants_1.Inputs.Name, { required: false }),
@ -118783,8 +118784,12 @@ function run() {
repository: core.getInput(constants_1.Inputs.Repository, { required: false }),
runID: parseInt(core.getInput(constants_1.Inputs.RunID, { required: false })),
pattern: core.getInput(constants_1.Inputs.Pattern, { required: false }),
mergeMultiple: core.getBooleanInput(constants_1.Inputs.MergeMultiple, { required: false })
mergeMultiple: core.getBooleanInput(constants_1.Inputs.MergeMultiple, {
required: false
}),
warnOnFailure: core.getBooleanInput(constants_1.Inputs.WarnOnFailure, { required: false })
};
flags.warnOnFailure = inputs.warnOnFailure;
if (!inputs.path) {
inputs.path = process.env['GITHUB_WORKSPACE'] || process.cwd();
}
@ -118863,7 +118868,17 @@ function run() {
}
});
}
run().catch(err => core.setFailed(`Unable to download artifact(s): ${err.message}`));
{
const flags = { warnOnFailure: false };
run(flags).catch(err => {
if (flags.warnOnFailure) {
core.setOutput('failure', `Unable to download artifact(s): ${err.message}`);
}
else {
core.setFailed(`Unable to download artifact(s): ${err.message}`);
}
});
}
/***/ }),