Skip to content

Commit d1e6567

Browse files
Merge pull request #58 from step-security/auto-cherry-pick
chore: Cherry-picked changes from upstream
2 parents 5d5dceb + 5363ab2 commit d1e6567

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.github/workflows/auto_cherry_pick.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ permissions:
2424
jobs:
2525
cherry-pick:
2626
if: github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required')
27-
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@feature/verify-cherry-pick
27+
uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1
2828
with:
2929
original-owner: "google-github-actions"
3030
repo-name: "auth"

dist/main/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@step-security/google-github-auth",
3-
"version": "2.1.11",
3+
"version": "2.1.12",
44
"description": "Authenticate to Google Cloud using OIDC tokens or JSON service account keys.",
55
"main": "dist/main/index.js",
66
"scripts": {

src/main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
parseBoolean,
3232
parseDuration,
3333
pinnedToHeadWarning,
34+
withRetries,
3435
} from '@google-github-actions/actions-utils';
3536

3637
import {
@@ -131,7 +132,12 @@ export async function run(logger: Logger) {
131132
throw new Error(oidcWarning);
132133
}
133134

134-
const oidcToken = await getIDToken(oidcTokenAudience);
135+
const oidcToken = await withRetries(
136+
async (): Promise<string> => {
137+
return await getIDToken(oidcTokenAudience);
138+
},
139+
{ retries: 3 },
140+
)();
135141
client = new WorkloadIdentityFederationClient({
136142
logger: logger,
137143
universe: universe,

0 commit comments

Comments
 (0)