mirror of https://github.com/actions/toolkit
updating resolves
parent
66343faec4
commit
c7de68f215
|
@ -1,5 +1,4 @@
|
|||
import * as stream from 'stream'
|
||||
import * as async from 'async'
|
||||
import * as ZipStream from 'zip-stream'
|
||||
import * as core from '@actions/core'
|
||||
import {createReadStream} from 'fs'
|
||||
|
@ -60,6 +59,9 @@ export async function createZipUploadStream(
|
|||
})
|
||||
})
|
||||
|
||||
await Promise.all(uploadFilePromises).then(result => {
|
||||
core.debug(`Zip result is ${result}`)
|
||||
zip.finalize()
|
||||
const bufferSize = getUploadChunkSize()
|
||||
const zipUploadStream = new ZipUploadStream(bufferSize)
|
||||
core.debug(
|
||||
|
@ -68,10 +70,10 @@ export async function createZipUploadStream(
|
|||
core.debug(
|
||||
`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`
|
||||
)
|
||||
await Promise.all(uploadFilePromises)
|
||||
// zip.pipe(zipUploadStream)
|
||||
zip.finalize()
|
||||
return zipUploadStream
|
||||
})
|
||||
throw new Error('An error has occurred during zip creation for the artifact')
|
||||
// zip.pipe(zipUploadStream)
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
@ -81,6 +83,7 @@ const zipErrorCallback = (error: any): void => {
|
|||
|
||||
throw new Error('An error has occurred during zip creation for the artifact')
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const zipWarningCallback = (err: any): void => {
|
||||
if (err.code === 'ENOENT') {
|
||||
core.warning(
|
||||
|
|
Loading…
Reference in New Issue