mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-20 13:38:20 +02:00
Merge fd6355b2d3
into 448e3f862a
This commit is contained in:
commit
55654a4b9a
2 changed files with 23 additions and 26 deletions
19
dist/index.js
vendored
19
dist/index.js
vendored
|
@ -118881,16 +118881,15 @@ function run() {
|
||||||
core.info(`- ${artifact.name} (ID: ${artifact.id}, Size: ${artifact.size}, Expected Digest: ${artifact.digest})`);
|
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);
|
||||||
name: artifact.name,
|
for (const chunk of chunkedArtifacts) {
|
||||||
promise: artifact_1.default.downloadArtifact(artifact.id, Object.assign(Object.assign({}, options), { path: isSingleArtifactDownload || inputs.mergeMultiple
|
const chunkPromises = chunk.map(artifact => ({
|
||||||
? resolvedPath
|
name: artifact.name,
|
||||||
: path.join(resolvedPath, artifact.name), expectedHash: artifact.digest }))
|
promise: artifact_1.default.downloadArtifact(artifact.id, Object.assign(Object.assign({}, options), { path: isSingleArtifactDownload || inputs.mergeMultiple
|
||||||
}));
|
? resolvedPath
|
||||||
const chunkedPromises = (0, exports.chunk)(downloadPromises, PARALLEL_DOWNLOADS);
|
: path.join(resolvedPath, artifact.name), expectedHash: artifact.digest }))
|
||||||
for (const chunk of chunkedPromises) {
|
}));
|
||||||
const chunkPromises = chunk.map(item => item.promise);
|
const results = yield Promise.all(chunkPromises.map(item => item.promise));
|
||||||
const results = yield Promise.all(chunkPromises);
|
|
||||||
for (let i = 0; i < results.length; i++) {
|
for (let i = 0; i < results.length; i++) {
|
||||||
const outcome = results[i];
|
const outcome = results[i];
|
||||||
const artifactName = chunk[i].name;
|
const artifactName = chunk[i].name;
|
||||||
|
|
|
@ -169,22 +169,20 @@ export async function run(): Promise<void> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadPromises = artifacts.map(artifact => ({
|
const chunkedArtifacts = chunk(artifacts, PARALLEL_DOWNLOADS)
|
||||||
name: artifact.name,
|
for (const chunk of chunkedArtifacts) {
|
||||||
promise: artifactClient.downloadArtifact(artifact.id, {
|
const chunkPromises = chunk.map(artifact => ({
|
||||||
...options,
|
name: artifact.name,
|
||||||
path:
|
promise: artifactClient.downloadArtifact(artifact.id, {
|
||||||
isSingleArtifactDownload || inputs.mergeMultiple
|
...options,
|
||||||
? resolvedPath
|
path:
|
||||||
: path.join(resolvedPath, artifact.name),
|
isSingleArtifactDownload || inputs.mergeMultiple
|
||||||
expectedHash: artifact.digest
|
? resolvedPath
|
||||||
})
|
: path.join(resolvedPath, artifact.name),
|
||||||
}))
|
expectedHash: artifact.digest
|
||||||
|
})
|
||||||
const chunkedPromises = chunk(downloadPromises, PARALLEL_DOWNLOADS)
|
}))
|
||||||
for (const chunk of chunkedPromises) {
|
const results = await Promise.all(chunkPromises.map(item => item.promise))
|
||||||
const chunkPromises = chunk.map(item => item.promise)
|
|
||||||
const results = await Promise.all(chunkPromises)
|
|
||||||
|
|
||||||
for (let i = 0; i < results.length; i++) {
|
for (let i = 0; i < results.length; i++) {
|
||||||
const outcome = results[i]
|
const outcome = results[i]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue