Fix args for ossutil config
This commit is contained in:
@@ -10,20 +10,23 @@ async function run(): Promise<void> {
|
||||
core.info('ossutil is successfully installed')
|
||||
|
||||
// config
|
||||
const endpoint = core.getInput('endpoint')
|
||||
const accessKeyId = core.getInput('access-key-id')
|
||||
const accessKeySecret = core.getInput('access-key-secret')
|
||||
const inputOptions: core.InputOptions = {required: true}
|
||||
const endpoint = core.getInput('endpoint', inputOptions)
|
||||
const accessKeyId = core.getInput('access-key-id', inputOptions)
|
||||
const accessKeySecret = core.getInput('access-key-secret', inputOptions)
|
||||
const stsToken = core.getInput('sts-token')
|
||||
const args = [
|
||||
'config',
|
||||
'--endpoint',
|
||||
endpoint,
|
||||
'--access-key-id',
|
||||
accessKeyId,
|
||||
'--access-key-secret',
|
||||
accessKeySecret,
|
||||
'--sts-token',
|
||||
stsToken
|
||||
accessKeySecret
|
||||
]
|
||||
if (stsToken) {
|
||||
args.push('--sts-token', stsToken)
|
||||
}
|
||||
const exitCode = await exec.exec('ossutil', args)
|
||||
if (exitCode === 0) {
|
||||
core.info('ossutil config is done')
|
||||
|
||||
Reference in New Issue
Block a user