add jwtGiteaOIDC input

This commit is contained in:
2024-10-04 17:32:16 +02:00
parent bab85d399e
commit 2caae9e34b
4 changed files with 35 additions and 24 deletions
+5 -1
View File
@@ -18798,8 +18798,12 @@ async function retrieveToken(method, client) {
const keyPassword = core.getInput('jwtKeyPassword', { required: false });
const tokenTtl = core.getInput('jwtTtl', { required: false }) || '3600'; // 1 hour
const githubAudience = core.getInput('jwtGithubAudience', { required: false });
const jwtGiteaOIDC = core.getInput('jwtGiteaOIDC', { required: false });
if (!privateKey) {
if (jwtGiteaOIDC) {
jwt = jwtGiteaOIDC
}
else if (!privateKey) {
jwt = await core.getIDToken(githubAudience)
} else {
jwt = generateJwt(privateKey, keyPassword, Number(tokenTtl));