5
0
Fork 0
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:
Alex Kulikovskikh 2021-10-05 18:01:36 -04:00
parent 7f400189c6
commit 3a6afdfc5c
3 changed files with 3 additions and 2 deletions

View file

@ -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
View file

@ -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));
} }

View file

@ -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));
} }