mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-26 00:18:30 +02:00
ensure we're downloading to the correct directory
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
parent
34aa167be5
commit
c91b9fb13e
2 changed files with 7 additions and 2 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -31184,12 +31184,13 @@ function run() {
|
|||
continue;
|
||||
}
|
||||
const getObjectParams = { Bucket: s3Bucket, Key: fileObject.Key };
|
||||
const localKey = fileObject.Key.replace(s3Prefix, '');
|
||||
const localKey = path_1.default.join(resolvedPath, fileObject.Key.replace(s3Prefix, ''));
|
||||
const writeStream = fs.createWriteStream(localKey);
|
||||
core.info(`Started download: ${localKey}`);
|
||||
core.debug(`S3 download uri: s3://${s3Bucket}/${fileObject.Key}`);
|
||||
const readStream = s3.getObject(getObjectParams).createReadStream();
|
||||
readStream.pipe(writeStream);
|
||||
writeStream.close();
|
||||
core.info(`Finished download for ${localKey}`);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue