mirror of
https://github.com/actions/download-artifact.git
synced 2024-11-22 21:55:29 +00:00
chore: transpile action code
This commit is contained in:
parent
808bacee91
commit
b8b81c1932
17
dist/index.js
vendored
17
dist/index.js
vendored
@ -9498,6 +9498,7 @@ var Inputs;
|
|||||||
(function (Inputs) {
|
(function (Inputs) {
|
||||||
Inputs["Name"] = "name";
|
Inputs["Name"] = "name";
|
||||||
Inputs["Path"] = "path";
|
Inputs["Path"] = "path";
|
||||||
|
Inputs["IfNoArtifact"] = "if-no-artifact";
|
||||||
})(Inputs = exports.Inputs || (exports.Inputs = {}));
|
})(Inputs = exports.Inputs || (exports.Inputs = {}));
|
||||||
var Outputs;
|
var Outputs;
|
||||||
(function (Outputs) {
|
(function (Outputs) {
|
||||||
@ -9536,9 +9537,12 @@ const path_1 = __nccwpck_require__(1017);
|
|||||||
const constants_1 = __nccwpck_require__(9042);
|
const constants_1 = __nccwpck_require__(9042);
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let ifNoArtifact = '';
|
||||||
try {
|
try {
|
||||||
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
||||||
const path = core.getInput(constants_1.Inputs.Path, { required: false });
|
const path = core.getInput(constants_1.Inputs.Path, { required: false });
|
||||||
|
ifNoArtifact =
|
||||||
|
core.getInput(constants_1.Inputs.IfNoArtifact, { required: false }) || 'fail';
|
||||||
let resolvedPath;
|
let resolvedPath;
|
||||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||||
if (path.startsWith(`~`)) {
|
if (path.startsWith(`~`)) {
|
||||||
@ -9574,7 +9578,18 @@ function run() {
|
|||||||
core.info('Artifact download has finished successfully');
|
core.info('Artifact download has finished successfully');
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.setFailed(err.message);
|
const { message } = err;
|
||||||
|
switch (ifNoArtifact) {
|
||||||
|
case 'warn':
|
||||||
|
core.warning(message);
|
||||||
|
break;
|
||||||
|
case 'ignore':
|
||||||
|
core.info(message);
|
||||||
|
break;
|
||||||
|
case 'fail':
|
||||||
|
default:
|
||||||
|
core.setFailed(message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user