@actions/artifact download artifacts (#340)

* Download Artifacts using @actions/artifact
This commit is contained in:
Konrad Pabjan
2020-02-13 18:24:11 -05:00
committed by GitHub
parent 84f1e31b69
commit f383109dc3
13 changed files with 1416 additions and 18 deletions
@@ -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
}