mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-20 13:38:20 +02:00
Update index.js
This commit is contained in:
parent
0b0bc298b5
commit
35c343ba75
1 changed files with 9 additions and 10 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -118840,16 +118840,15 @@ function run() {
|
|||
core.info(`- ${artifact.name} (ID: ${artifact.id}, Size: ${artifact.size}, Expected Digest: ${artifact.digest})`);
|
||||
});
|
||||
}
|
||||
const downloadPromises = artifacts.map(artifact => ({
|
||||
const chunkedArtifacts = (0, exports.chunk)(artifacts, PARALLEL_DOWNLOADS);
|
||||
for (const chunk of chunkedArtifacts) {
|
||||
const chunkPromises = chunk.map(artifact => ({
|
||||
name: artifact.name,
|
||||
promise: artifact_1.default.downloadArtifact(artifact.id, Object.assign(Object.assign({}, options), { path: isSingleArtifactDownload || inputs.mergeMultiple
|
||||
? resolvedPath
|
||||
: path.join(resolvedPath, artifact.name), expectedHash: artifact.digest }))
|
||||
}));
|
||||
const chunkedPromises = (0, exports.chunk)(downloadPromises, PARALLEL_DOWNLOADS);
|
||||
for (const chunk of chunkedPromises) {
|
||||
const chunkPromises = chunk.map(item => item.promise);
|
||||
const results = yield Promise.all(chunkPromises);
|
||||
const results = yield Promise.all(chunkPromises.map(item => item.promise));
|
||||
for (let i = 0; i < results.length; i++) {
|
||||
const outcome = results[i];
|
||||
const artifactName = chunk[i].name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue