-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup Workload Identity Federation (#323)
* Use Google auth action for WIF * Update action * Try using new GKE auth action * Specify cluster location * Remove deprecated action * Use correct project ID * Install gke-gcloud-auth-plugin * Do we need GKE auth? * Remove comments * Update pool and provider * Copy changes to staging and default * Test removing permissions block * Only add back id-token write permission * Remove contents permission
- Loading branch information
1 parent
60ea981
commit ca3d50d
Showing
4 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ jobs: | |
MODULE_NAME: default | ||
VERSION: ${{ github.run_number }} | ||
DATABASE_POSTFIX: ${{ secrets.DATABASE_POSTFIX }} | ||
permissions: | ||
id-token: 'write' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -25,18 +27,17 @@ jobs: | |
python-version: "3.8.x" | ||
architecture: "x64" | ||
|
||
- id: gcauth | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
credentials_json: ${{ secrets.GCLOUD_AUTH }} | ||
project_id: 'decent-digit-629' | ||
workload_identity_provider: 'projects/354656325390/locations/global/workloadIdentityPools/cfl-pool/providers/cfl-provider' | ||
service_account: '[email protected]' | ||
|
||
- name: Setup gcloud CLI | ||
uses: google-github-actions/setup-gcloud@v2 | ||
|
||
- name: GKE auth | ||
uses: simenandre/setup-gke-gcloud-auth-plugin@v1 | ||
|
||
- name: Deploy to Google Cloud | ||
uses: ./.github/actions/deploy_gcloud | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ jobs: | |
MODULE_NAME: dev | ||
VERSION: ${{ github.run_number }} | ||
DATABASE_POSTFIX: ${{ secrets.DATABASE_POSTFIX }} | ||
permissions: | ||
id-token: 'write' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -39,18 +41,17 @@ jobs: | |
python-version: "3.8.x" | ||
architecture: "x64" | ||
|
||
- id: gcauth | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
credentials_json: ${{ secrets.GCLOUD_AUTH }} | ||
project_id: 'decent-digit-629' | ||
workload_identity_provider: 'projects/354656325390/locations/global/workloadIdentityPools/cfl-pool/providers/cfl-provider' | ||
service_account: '[email protected]' | ||
|
||
- name: Setup gcloud CLI | ||
uses: google-github-actions/setup-gcloud@v2 | ||
|
||
- name: GKE auth | ||
uses: simenandre/setup-gke-gcloud-auth-plugin@v1 | ||
|
||
- name: Deploy to Google Cloud | ||
uses: ./.github/actions/deploy_gcloud | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ jobs: | |
MODULE_NAME: staging | ||
VERSION: ${{ github.run_number }} | ||
DATABASE_POSTFIX: ${{ secrets.DATABASE_POSTFIX }} | ||
permissions: | ||
id-token: 'write' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -25,18 +27,17 @@ jobs: | |
python-version: "3.8.x" | ||
architecture: "x64" | ||
|
||
- id: gcauth | ||
- id: auth | ||
name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
credentials_json: ${{ secrets.GCLOUD_AUTH }} | ||
project_id: 'decent-digit-629' | ||
workload_identity_provider: 'projects/354656325390/locations/global/workloadIdentityPools/cfl-pool/providers/cfl-provider' | ||
service_account: '[email protected]' | ||
|
||
- name: Setup gcloud CLI | ||
uses: google-github-actions/setup-gcloud@v2 | ||
|
||
- name: GKE auth | ||
uses: simenandre/setup-gke-gcloud-auth-plugin@v1 | ||
|
||
- name: Deploy to Google Cloud | ||
uses: ./.github/actions/deploy_gcloud | ||
with: | ||
|