1
0
mirror of https://github.com/actions/download-artifact.git synced 2025-12-06 09:47:49 +01:00

Compare commits

..

9 Commits

Author SHA1 Message Date
eggyhead
7f2adb9ead Revert "deleting minimatch license dep"
This reverts commit f60105d0b9.
2024-04-17 00:35:15 +00:00
eggyhead
b54a9b6fe5 Merge branch 'main' into eggyhead/update-artifact-2.1.5 2024-04-16 17:30:32 -07:00
Your Name
f60105d0b9 deleting minimatch license dep 2024-04-16 13:29:58 -07:00
eggyhead
0d3f4c92a7 updating @actions/core license 2024-04-16 19:56:51 +00:00
eggyhead
defbcabd27 updating artifact license 2024-04-16 19:54:04 +00:00
eggyhead
e961f587f9 Revert "updating licensed cache"
This reverts commit 2fa39f3ad7.
2024-04-16 19:51:20 +00:00
Your Name
2fa39f3ad7 updating licensed cache 2024-04-16 12:38:47 -07:00
eggyhead
cbe11d7b94 updating release 2024-04-16 18:25:39 +00:00
eggyhead
0baa647135 updating @actions/artifact to v2.1.5 2024-04-16 18:20:15 +00:00
8 changed files with 9560 additions and 8099 deletions

View File

@@ -1,20 +0,0 @@
name: 'Publish Immutable Action Version'
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checking out
uses: actions/checkout@v4
- name: Publish
id: publish
uses: actions/publish-immutable-action@0.0.3

View File

@@ -1,6 +1,6 @@
---
name: "@actions/artifact"
version: 2.3.2
version: 2.1.5
type: npm
summary: Actions artifact lib
homepage: https://github.com/actions/toolkit/tree/main/packages/artifact

View File

@@ -1,5 +1,11 @@
# `@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.
See also [upload-artifact](https://github.com/actions/upload-artifact).

12421
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -189,8 +189,7 @@ jobs:
- name: Create a File
run: echo "hello from ${{ matrix.runs-on }}" > file-${{ matrix.runs-on }}.txt
- name: Upload Artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
- name: all-my-files
+ name: my-artifact-${{ matrix.runs-on }}
@@ -206,4 +205,4 @@ jobs:
+ pattern: my-artifact-*
```
Note that this will download all artifacts to a temporary directory and reupload them as a single artifact. For more information on inputs and other use cases for `actions/upload-artifact/merge@v4`, see [the action documentation](https://github.com/actions/upload-artifact/blob/main/merge/README.md).
Note that this will download all artifacts to a temporary directory and reupload them as a single artifact. For more information on inputs and other use cases for `actions/upload-artifact/merge@v4`, see [the action documentation](../merge/README.md).

5165
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "download-artifact",
"version": "4.2.0",
"version": "4.1.4",
"description": "Download an Actions Artifact from a workflow run",
"main": "dist/index.js",
"scripts": {
@@ -28,8 +28,8 @@
},
"homepage": "https://github.com/actions/download-artifact#readme",
"dependencies": {
"@actions/artifact": "^2.3.2",
"@actions/core": "^1.10.1",
"@actions/artifact": "^2.1.5",
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"minimatch": "^9.0.3"
},

View File

@@ -106,43 +106,29 @@ async function run(): Promise<void> {
core.info(`Preparing to download the following artifacts:`)
artifacts.forEach(artifact => {
core.info(
`- ${artifact.name} (ID: ${artifact.id}, Size: ${artifact.size}, Expected Digest: ${artifact.digest})`
`- ${artifact.name} (ID: ${artifact.id}, Size: ${artifact.size})`
)
})
}
const downloadPromises = artifacts.map(artifact => ({
name: artifact.name,
promise: artifactClient.downloadArtifact(artifact.id, {
const downloadPromises = artifacts.map(artifact =>
artifactClient.downloadArtifact(artifact.id, {
...options,
path:
isSingleArtifactDownload || inputs.mergeMultiple
? resolvedPath
: path.join(resolvedPath, artifact.name),
expectedHash: artifact.digest
: path.join(resolvedPath, artifact.name)
})
}))
)
const chunkedPromises = chunk(downloadPromises, PARALLEL_DOWNLOADS)
for (const chunk of chunkedPromises) {
const chunkPromises = chunk.map(item => item.promise)
const results = await Promise.all(chunkPromises)
for (let i = 0; i < results.length; i++) {
const outcome = results[i]
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')
await Promise.all(chunk)
}
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
core.setOutput(Outputs.DownloadPath, resolvedPath)
core.info('Download artifact has finished successfully')
}
run().catch(err =>