mirror of
https://code.forgejo.org/actions/download-artifact.git
synced 2024-11-14 02:26:16 +01:00
Update download-artifact.ts
This commit is contained in:
parent
b8fe923df2
commit
8371d5fae1
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,7 @@ async function run(): Promise<void> {
|
|||
path: core.getInput(Inputs.Path, {required: false}),
|
||||
token: core.getInput(Inputs.GitHubToken, {required: false}),
|
||||
repository: core.getInput(Inputs.Repository, {required: false}),
|
||||
maxAttempts: core.getInput(constants_1.Inputs.MaxAttempts, { required: false }),
|
||||
runID: parseInt(core.getInput(Inputs.RunID, {required: false})),
|
||||
pattern: core.getInput(Inputs.Pattern, {required: false}),
|
||||
mergeMultiple: core.getBooleanInput(Inputs.MergeMultiple, {required: false})
|
||||
|
@ -55,6 +56,14 @@ async function run(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
if (inputs.maxAttempts) {
|
||||
core.info(`Max attempts for retrying download: ${inputs.maxAttempts}`);
|
||||
options.findBy["maxAttempts"] = inputs.maxAttempts;
|
||||
}
|
||||
else {
|
||||
throw new Error(`Invalid retryCount: '${inputs.maxAttempts}'. Must be greater than 0`);
|
||||
}
|
||||
|
||||
let artifacts: Artifact[] = []
|
||||
|
||||
if (isSingleArtifactDownload) {
|
||||
|
|
Loading…
Reference in a new issue