File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,4 @@ credentials.json
3636
3737# Ignore generated credentials from google-github-actions/auth
3838gha-creds- * .json
39+ key.json
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ SERVICE_ACCOUNT=$CAPY_SERVICE_ACCOUNT
4+ PROJECT_ID=$CAPY_PROJECT_ID
5+
6+ gcloud iam service-accounts add-iam-policy-binding $SERVICE_ACCOUNT \
7+ --role=roles/iam.serviceAccountTokenCreator \
8+ --member=serviceAccount:$SERVICE_ACCOUNT \
9+ --project=$PROJECT_ID
10+
11+ gcloud iam service-accounts keys create key.json \
12+ --iam-account=$SERVICE_ACCOUNT
13+
14+ # Activate the service account
15+ gcloud auth activate-service-account --key-file=key.json
16+
17+ # Generate the identity token
318gcloud auth print-identity-token
You can’t perform that action at this time.
0 commit comments