Skip to content

Commit d8c9653

Browse files
author
Mladen Rusev
committed
add auth with GKE using OIDC
1 parent 63b3b1d commit d8c9653

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666

6767
test-e2e:
6868
runs-on: ubuntu-latest
69+
permissions:
70+
contents: 'read'
71+
id-token: 'write' # This is required for OIDC authentication
72+
6973
steps:
7074
- uses: actions/checkout@v4
7175
with:
@@ -75,6 +79,16 @@ jobs:
7579
with:
7680
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: ${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}
7781

82+
- name: Authenticate to Google Cloud
83+
id: auth
84+
uses: google-github-actions/auth@v2
85+
with:
86+
workload_identity_provider: 'projects/1034149387603/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
87+
service_account: 'gke-cluster-creation@machineidentitysecurity-jsci-e.iam.gserviceaccount.com'
88+
89+
- name: Set up gcloud CLI
90+
uses: google-github-actions/setup-gcloud@v2
91+
7892
- id: go-version
7993
run: |
8094
make print-go-version >> "$GITHUB_OUTPUT"
@@ -91,6 +105,6 @@ jobs:
91105
VEN_API_HOST: api.venafi.cloud
92106
VEN_ZONE: tlspk-bench\Default
93107
VEN_VCP_REGION: us
94-
CLOUDSDK_CORE_PROJECT: jetstack-mael-valais
108+
CLOUDSDK_CORE_PROJECT: machineidentitysecurity-jsci-e
95109
CLOUDSDK_COMPUTE_ZONE: europe-west1-b
96110
CLUSTER_NAME: test-secretless

0 commit comments

Comments
 (0)