diff --git a/dist/index.js b/dist/index.js index 5ab0ef9..5be667a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31208,6 +31208,7 @@ function run() { throw new Error(`Could not find objects with ${s3Prefix}`); } core.info(`Found ${objects.Contents.length} objects with prefix ${s3Prefix}`); + let num = 1; for (const fileObject of objects.Contents) { if (!fileObject.Key) { continue; @@ -31218,9 +31219,10 @@ function run() { core.debug(`Creating directory (${localKeyDir}) since it did not exist`); fs.mkdirSync(localKeyDir, { recursive: true }); } - core.info(`Starting download (): ${localKey}`); + core.info(`Starting download (${num}/${objects.Contents.length}): ${localKey}`); yield doDownload(s3, s3Bucket, fileObject.Key, fs.createWriteStream(localKey)); - core.info(`Finished download: ${localKey}`); + core.info(`Finished download (${num}/${objects.Contents.length}): ${localKey}`); + num++; } // output the directory that the artifact(s) was/were downloaded to // if no path is provided, an empty string resolves to the current working directory diff --git a/src/download-artifact.ts b/src/download-artifact.ts index f7fab90..f21c2ff 100644 --- a/src/download-artifact.ts +++ b/src/download-artifact.ts @@ -50,7 +50,10 @@ async function run(): Promise { if (!objects.Contents) { throw new Error(`Could not find objects with ${s3Prefix}`) } - core.info(`Found ${objects.Contents.length} objects with prefix ${s3Prefix}`) + core.info( + `Found ${objects.Contents.length} objects with prefix ${s3Prefix}` + ) + let num = 1 for (const fileObject of objects.Contents) { if (!fileObject.Key) { continue @@ -64,14 +67,19 @@ async function run(): Promise { core.debug(`Creating directory (${localKeyDir}) since it did not exist`) fs.mkdirSync(localKeyDir, {recursive: true}) } - core.info(`Starting download (): ${localKey}`) + core.info( + `Starting download (${num}/${objects.Contents.length}): ${localKey}` + ) await doDownload( s3, s3Bucket, fileObject.Key, fs.createWriteStream(localKey) ) - core.info(`Finished download: ${localKey}`) + core.info( + `Finished download (${num}/${objects.Contents.length}): ${localKey}` + ) + num++ } // output the directory that the artifact(s) was/were downloaded to // if no path is provided, an empty string resolves to the current working directory