Removed progress percentage as there is no way to deduce content length

This commit is contained in:
Michal Dorner 2021-02-15 21:06:19 +01:00
parent 1ae86a176d
commit e356ffe9d0
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 2 additions and 4 deletions

View file

@ -33,7 +33,6 @@ export async function downloadArtifact(
octokit: InstanceType<typeof GitHub>,
artifactId: number,
fileName: string,
size: number,
token: string
): Promise<void> {
core.startGroup(`Downloading artifact ${fileName}`)
@ -74,8 +73,7 @@ export async function downloadArtifact(
core.info(`Downloading ${url}`)
downloadStream.on('downloadProgress', ({transferred}) => {
const percentage = Math.round((transferred / size) * 100)
core.info(`Progress: ${transferred}/${size} (${percentage}%)`)
core.info(`Progress: ${transferred} B`)
})
await asyncStream(downloadStream, fileWriterStream)
} finally {