mirror of
https://github.com/actions/download-artifact.git
synced 2025-08-18 21:49:56 +08:00
better fallback for path and append aritfact name for mutli-download
This commit is contained in:
5
dist/index.js
vendored
5
dist/index.js
vendored
@@ -118700,6 +118700,9 @@ function run() {
|
||||
repository: core.getInput(constants_1.Inputs.Repository, { required: true }),
|
||||
runID: parseInt(core.getInput(constants_1.Inputs.RunID, { required: true }))
|
||||
};
|
||||
if (!inputs.path) {
|
||||
inputs.path = process.env['GITHUB_WORKSPACE'] || process.cwd();
|
||||
}
|
||||
if (inputs.path.startsWith(`~`)) {
|
||||
inputs.path = inputs.path.replace('~', os.homedir());
|
||||
}
|
||||
@@ -118728,7 +118731,7 @@ function run() {
|
||||
artifacts = listArtifactResponse.artifacts;
|
||||
}
|
||||
const downloadPromises = artifacts.map(artifact => artifactClient.downloadArtifact(artifact.id, owner, repo, inputs.token, {
|
||||
path: resolvedPath
|
||||
path: path.join(resolvedPath, artifact.name)
|
||||
}));
|
||||
const chunkedPromises = exports.chunk(downloadPromises, PARALLEL_DOWNLOADS);
|
||||
for (const chunk of chunkedPromises) {
|
||||
|
Reference in New Issue
Block a user