mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-16 02:43:45 +00:00
fix: move default value for jwtGithubAudience to action.yml
This commit is contained in:
parent
7f400189c6
commit
3a6afdfc5c
3 changed files with 3 additions and 2 deletions
|
|
@ -72,6 +72,7 @@ inputs:
|
||||||
jwtGithubAudience:
|
jwtGithubAudience:
|
||||||
description: 'Identifies the recipient ("aud" claim) that the JWT is intended for'
|
description: 'Identifies the recipient ("aud" claim) that the JWT is intended for'
|
||||||
required: false
|
required: false
|
||||||
|
default: 'sigstore'
|
||||||
jwtTtl:
|
jwtTtl:
|
||||||
description: 'Time in seconds, after which token expires'
|
description: 'Time in seconds, after which token expires'
|
||||||
required: false
|
required: false
|
||||||
|
|
|
||||||
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -1253,7 +1253,7 @@ async function retrieveToken(method, client) {
|
||||||
const githubAudience = core.getInput('jwtGithubAudience', { required: false });
|
const githubAudience = core.getInput('jwtGithubAudience', { required: false });
|
||||||
|
|
||||||
if (!privateKey) {
|
if (!privateKey) {
|
||||||
jwt = await core.getIDToken(githubAudience || 'sigstore')
|
jwt = await core.getIDToken(githubAudience)
|
||||||
} else {
|
} else {
|
||||||
jwt = generateJwt(privateKey, keyPassword, Number(tokenTtl));
|
jwt = generateJwt(privateKey, keyPassword, Number(tokenTtl));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ async function retrieveToken(method, client) {
|
||||||
const githubAudience = core.getInput('jwtGithubAudience', { required: false });
|
const githubAudience = core.getInput('jwtGithubAudience', { required: false });
|
||||||
|
|
||||||
if (!privateKey) {
|
if (!privateKey) {
|
||||||
jwt = await core.getIDToken(githubAudience || 'sigstore')
|
jwt = await core.getIDToken(githubAudience)
|
||||||
} else {
|
} else {
|
||||||
jwt = generateJwt(privateKey, keyPassword, Number(tokenTtl));
|
jwt = generateJwt(privateKey, keyPassword, Number(tokenTtl));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue