mirror of
https://github.com/actions/download-artifact.git
synced 2026-09-09 20:51:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b14cf4c926 | ||
|
|
c5804ef743 | ||
|
|
956811a503 | ||
|
|
af3c6d3e5b | ||
|
|
4dd97f8f21 | ||
|
|
da9985dde6 | ||
|
|
81ba80daa4 | ||
|
|
727afbf2b0 | ||
|
|
56c2d7ea8c | ||
|
|
7797bfcd59 | ||
|
|
9ff67cb2d2 | ||
|
|
049eba1e9a | ||
|
|
503e7a18ae | ||
|
|
a8a786b097 | ||
|
|
24aef17bbf | ||
|
|
b81a615862 |
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/artifact"
|
name: "@actions/artifact"
|
||||||
version: 2.2.2
|
version: 2.3.2
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions artifact lib
|
summary: Actions artifact lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/artifact
|
homepage: https://github.com/actions/toolkit/tree/main/packages/artifact
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# `@actions/download-artifact`
|
# `@actions/download-artifact`
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> actions/download-artifact@v3 is scheduled for deprecation on **November 30, 2024**. [Learn more.](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/)
|
|
||||||
> Similarly, v1/v2 are scheduled for deprecation on **June 30, 2024**.
|
|
||||||
> Please update your workflow to use v4 of the artifact actions.
|
|
||||||
> This deprecation will not impact any existing versions of GitHub Enterprise Server being used by customers.
|
|
||||||
|
|
||||||
Download [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) from your Workflow Runs. Internally powered by the [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package.
|
Download [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) from your Workflow Runs. Internally powered by the [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package.
|
||||||
|
|
||||||
See also [upload-artifact](https://github.com/actions/upload-artifact).
|
See also [upload-artifact](https://github.com/actions/upload-artifact).
|
||||||
|
|||||||
Vendored
+400
-37
File diff suppressed because one or more lines are too long
Generated
+9
-9
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "download-artifact",
|
"name": "download-artifact",
|
||||||
"version": "4.1.9",
|
"version": "4.2.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "download-artifact",
|
"name": "download-artifact",
|
||||||
"version": "4.1.9",
|
"version": "4.2.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "^2.2.2",
|
"@actions/artifact": "^2.3.2",
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"minimatch": "^9.0.3"
|
"minimatch": "^9.0.3"
|
||||||
@@ -36,9 +36,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/artifact": {
|
"node_modules/@actions/artifact": {
|
||||||
"version": "2.2.2",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.3.2.tgz",
|
||||||
"integrity": "sha512-UtS1kcINiPRkI3/hDKkO/XdrtKo89kn8s81J67QNBU6RRMWSSXrrfCCbQVThuxcdW2boOLv51NVCEKyo954A2A==",
|
"integrity": "sha512-uX2Mr5KEPcwnzqa0Og9wOTEKIae6C/yx9P/m8bIglzCS5nZDkcQC/zRWjjoEsyVecL6oQpBx5BuqQj/yuVm0gw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
@@ -6032,9 +6032,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@actions/artifact": {
|
"@actions/artifact": {
|
||||||
"version": "2.2.2",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.3.2.tgz",
|
||||||
"integrity": "sha512-UtS1kcINiPRkI3/hDKkO/XdrtKo89kn8s81J67QNBU6RRMWSSXrrfCCbQVThuxcdW2boOLv51NVCEKyo954A2A==",
|
"integrity": "sha512-uX2Mr5KEPcwnzqa0Og9wOTEKIae6C/yx9P/m8bIglzCS5nZDkcQC/zRWjjoEsyVecL6oQpBx5BuqQj/yuVm0gw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "download-artifact",
|
"name": "download-artifact",
|
||||||
"version": "4.1.9",
|
"version": "4.2.0",
|
||||||
"description": "Download an Actions Artifact from a workflow run",
|
"description": "Download an Actions Artifact from a workflow run",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/actions/download-artifact#readme",
|
"homepage": "https://github.com/actions/download-artifact#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "^2.2.2",
|
"@actions/artifact": "^2.3.2",
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"minimatch": "^9.0.3"
|
"minimatch": "^9.0.3"
|
||||||
|
|||||||
+24
-10
@@ -106,29 +106,43 @@ async function run(): Promise<void> {
|
|||||||
core.info(`Preparing to download the following artifacts:`)
|
core.info(`Preparing to download the following artifacts:`)
|
||||||
artifacts.forEach(artifact => {
|
artifacts.forEach(artifact => {
|
||||||
core.info(
|
core.info(
|
||||||
`- ${artifact.name} (ID: ${artifact.id}, Size: ${artifact.size})`
|
`- ${artifact.name} (ID: ${artifact.id}, Size: ${artifact.size}, Expected Digest: ${artifact.digest})`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadPromises = artifacts.map(artifact =>
|
const downloadPromises = artifacts.map(artifact => ({
|
||||||
artifactClient.downloadArtifact(artifact.id, {
|
name: artifact.name,
|
||||||
|
promise: artifactClient.downloadArtifact(artifact.id, {
|
||||||
...options,
|
...options,
|
||||||
path:
|
path:
|
||||||
isSingleArtifactDownload || inputs.mergeMultiple
|
isSingleArtifactDownload || inputs.mergeMultiple
|
||||||
? resolvedPath
|
? resolvedPath
|
||||||
: path.join(resolvedPath, artifact.name)
|
: path.join(resolvedPath, artifact.name),
|
||||||
|
expectedHash: artifact.digest
|
||||||
})
|
})
|
||||||
)
|
}))
|
||||||
|
|
||||||
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 chunkPromises = chunk.map(item => item.promise)
|
||||||
}
|
const results = await Promise.all(chunkPromises)
|
||||||
|
|
||||||
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
|
for (let i = 0; i < results.length; i++) {
|
||||||
core.setOutput(Outputs.DownloadPath, resolvedPath)
|
const outcome = results[i]
|
||||||
core.info('Download artifact has finished successfully')
|
const artifactName = chunk[i].name
|
||||||
|
|
||||||
|
if (outcome.digestMismatch) {
|
||||||
|
core.warning(
|
||||||
|
`Artifact '${artifactName}' digest validation failed. Please verify the integrity of the artifact.`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
|
||||||
|
core.setOutput(Outputs.DownloadPath, resolvedPath)
|
||||||
|
core.info('Download artifact has finished successfully')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run().catch(err =>
|
run().catch(err =>
|
||||||
|
|||||||
Reference in New Issue
Block a user