mirror of
https://github.com/actions/toolkit.git
synced 2026-08-17 00:00:22 +02:00
@actions/artifact download artifacts (#340)
* Download Artifacts using @actions/artifact
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {debug} from '@actions/core'
|
||||
import {promises as fs} from 'fs'
|
||||
import {HttpCodes, HttpClient} from '@actions/http-client'
|
||||
import {BearerCredentialHandler} from '@actions/http-client/auth'
|
||||
import {IHeaders} from '@actions/http-client/interfaces'
|
||||
@@ -113,3 +114,13 @@ export function checkArtifactName(name: string): void {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function createDirectoriesForArtifact(
|
||||
directories: string[]
|
||||
): Promise<void> {
|
||||
for (const directory of directories) {
|
||||
await fs.mkdir(directory, {
|
||||
recursive: true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user