mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-21 14:08:23 +02:00
Merge bd6ef4177a
into b14cf4c926
This commit is contained in:
commit
b5a08e5120
9 changed files with 93 additions and 12 deletions
21
dist/index.js
vendored
21
dist/index.js
vendored
|
@ -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}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue