mirror of
https://github.com/actions/download-artifact.git
synced 2025-04-23 23:16:44 +08:00
Add warning on digest validation failure
This commit is contained in:
parent
1880958063
commit
302aa85ad2
@ -117,7 +117,8 @@ async function run(): Promise<void> {
|
|||||||
path:
|
path:
|
||||||
isSingleArtifactDownload || inputs.mergeMultiple
|
isSingleArtifactDownload || inputs.mergeMultiple
|
||||||
? resolvedPath
|
? resolvedPath
|
||||||
: path.join(resolvedPath, artifact.name)
|
: path.join(resolvedPath, artifact.name),
|
||||||
|
expectedHash: artifact.digest
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -126,6 +127,15 @@ async function run(): Promise<void> {
|
|||||||
await Promise.all(chunk)
|
await Promise.all(chunk)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const dlPromise of downloadPromises) {
|
||||||
|
const outcome = await dlPromise
|
||||||
|
if (outcome.digestMismatch) {
|
||||||
|
core.warning(
|
||||||
|
`Artifact digest validation failed. Please verify the integrity of the artifact.`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
|
core.info(`Total of ${artifacts.length} artifact(s) downloaded`)
|
||||||
core.setOutput(Outputs.DownloadPath, resolvedPath)
|
core.setOutput(Outputs.DownloadPath, resolvedPath)
|
||||||
core.info('Download artifact has finished successfully')
|
core.info('Download artifact has finished successfully')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user