diff --git a/src/main.ts b/src/main.ts index 54822ea8..8e0217fd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -31,6 +31,7 @@ import { parseBoolean, parseDuration, pinnedToHeadWarning, + withRetries, } from '@google-github-actions/actions-utils'; import { @@ -110,7 +111,12 @@ export async function run(logger: Logger) { throw new Error(oidcWarning); } - const oidcToken = await getIDToken(oidcTokenAudience); + const oidcToken = await withRetries( + async (): Promise => { + return await getIDToken(oidcTokenAudience); + }, + { retries: 3 }, + )(); client = new WorkloadIdentityFederationClient({ logger: logger, universe: universe,