@actions/artifact download artifacts (#340)
* Download Artifacts using @actions/artifact
This commit is contained in:
@@ -10,6 +10,15 @@ export function getUploadChunkSize(): number {
|
||||
return 4 * 1024 * 1024 // 4 MB Chunks
|
||||
}
|
||||
|
||||
export function getDownloadFileConcurrency(): number {
|
||||
return 2
|
||||
}
|
||||
|
||||
export function getDownloadArtifactConcurrency(): number {
|
||||
// when downloading all artifact at once, this is number of concurrent artifacts being downloaded
|
||||
return 1
|
||||
}
|
||||
|
||||
export function getRuntimeToken(): string {
|
||||
const token = process.env['ACTIONS_RUNTIME_TOKEN']
|
||||
if (!token) {
|
||||
@@ -33,3 +42,11 @@ export function getWorkFlowRunId(): string {
|
||||
}
|
||||
return workFlowRunId
|
||||
}
|
||||
|
||||
export function getWorkSpaceDirectory(): string {
|
||||
const workspaceDirectory = process.env['GITHUB_WORKSPACE']
|
||||
if (!workspaceDirectory) {
|
||||
throw new Error('Unable to get GITHUB_WORKSPACE env variable')
|
||||
}
|
||||
return workspaceDirectory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user