mirror of
https://code.forgejo.org/actions/download-artifact
synced 2025-06-08 04:58:20 +02:00
Refactor loop
This commit is contained in:
parent
b81a615862
commit
24aef17bbf
1 changed files with 7 additions and 9 deletions
|
@ -124,17 +124,15 @@ async function run(): Promise<void> {
|
||||||
|
|
||||||
const chunkedPromises = chunk(downloadPromises, PARALLEL_DOWNLOADS)
|
const chunkedPromises = chunk(downloadPromises, PARALLEL_DOWNLOADS)
|
||||||
for (const chunk of chunkedPromises) {
|
for (const chunk of chunkedPromises) {
|
||||||
await Promise.all(chunk)
|
const result = await Promise.all(chunk)
|
||||||
}
|
for (const outcome of result) {
|
||||||
|
|
||||||
for (const dlPromise of downloadPromises) {
|
|
||||||
const outcome = await dlPromise
|
|
||||||
if (outcome.digestMismatch) {
|
if (outcome.digestMismatch) {
|
||||||
core.warning(
|
core.warning(
|
||||||
`Artifact digest validation failed. Please verify the integrity of the artifact.`
|
`Artifact digest validation failed. Please verify the integrity of the artifact.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
|
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
|
||||||
core.setOutput(Outputs.DownloadPath, resolvedPath)
|
core.setOutput(Outputs.DownloadPath, resolvedPath)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue