mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 08:58:28 +02:00
ensure defaults for configuration values
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
parent
10ec34d92d
commit
59bb9ed754
4 changed files with 23 additions and 34 deletions
|
@ -1,7 +1,8 @@
|
|||
export enum Inputs {
|
||||
Name = 'name',
|
||||
Path = 'path',
|
||||
S3Bucket = 's3-bucket'
|
||||
S3Bucket = 's3-bucket',
|
||||
Region = 'region'
|
||||
}
|
||||
export enum Outputs {
|
||||
DownloadPath = 'download-path'
|
||||
|
|
|
@ -11,6 +11,7 @@ async function run(): Promise<void> {
|
|||
const name = core.getInput(Inputs.Name, {required: false})
|
||||
const chosenPath = core.getInput(Inputs.Path, {required: false})
|
||||
const s3Bucket = core.getInput(Inputs.S3Bucket, {required: false})
|
||||
const region = core.getInput(Inputs.Region, {required: false})
|
||||
|
||||
let resolvedPath = ''
|
||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||
|
@ -21,7 +22,7 @@ async function run(): Promise<void> {
|
|||
resolvedPath = path.resolve(chosenPath)
|
||||
}
|
||||
core.debug(`Resolved path is ${resolvedPath}`)
|
||||
const s3 = new AWS.S3()
|
||||
const s3 = new AWS.S3({region: region})
|
||||
const s3Prefix = `${github.context.repo.owner}/${github.context.repo.repo}/${github.context.runId}/${name}`
|
||||
const s3Params = {
|
||||
Bucket: s3Bucket,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue