Compare commits

..
16 Commits
Author SHA1 Message Date
JoannaaKL b14cf4c926 Merge pull request #383 from GhadimiR/main
Bump artifact version, do digest check
2025-03-18 16:31:00 +01:00
Ryan Ghadimi c5804ef743 Update dist 2025-03-18 15:23:08 +00:00
Ryan Ghadimi 956811a503 Update artifact to 2.3.2 2025-03-18 15:21:17 +00:00
Ryan Ghadimi af3c6d3e5b Update artifact license 2025-03-18 13:23:53 +00:00
Ryan Ghadimi 4dd97f8f21 Bump artifact package 2025-03-18 11:57:35 +00:00
Ryan Ghadimi da9985dde6 Merge branch 'main' into main 2025-03-17 10:26:24 +00:00
Larissa Fortuna 81ba80daa4 Merge pull request #384 from actions/lkfortuna-patch-1
Update README.md
2025-03-13 08:12:46 -07:00
Larissa Fortuna 727afbf2b0 Update README.md
removing deprecation warning
2025-03-12 15:02:16 -07:00
Ryan Ghadimi 56c2d7ea8c Make work as intended 2025-03-12 16:21:59 +00:00
Ryan Ghadimi 7797bfcd59 run release 2025-03-12 16:20:09 +00:00
Ryan Ghadimi 9ff67cb2d2 Break the thing, also log the expected digest 2025-03-12 16:17:52 +00:00
Ryan Ghadimi 049eba1e9a unbreak testing code 2025-03-12 16:04:02 +00:00
Ryan Ghadimi 503e7a18ae Refactor loop, break for testing 2025-03-12 15:40:05 +00:00
Ryan Ghadimi a8a786b097 update dist 2025-03-12 14:13:07 +00:00
Ryan Ghadimi 24aef17bbf Refactor loop 2025-03-12 14:02:51 +00:00
Ryan Ghadimi b81a615862 Bump artifact version, do digest check 2025-03-12 13:47:20 +00:00
6 changed files with 436 additions and 65 deletions
+1 -1
View File
@@ -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
-6
View File
@@ -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).
+400 -37
View File
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -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
View File
@@ -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
View File
@@ -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 =>