Skip to content

Commit

Permalink
Use WIF instead of service account key
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Jun 26, 2024
1 parent 44b3c89 commit 090124f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
7 changes: 3 additions & 4 deletions .github/actions/gcloud/deploy-app/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: "Code for Life - GCloud - Deploy App"
description: "Deploy an app to Google Cloud."
inputs:
gcp-credentials:
description: "The JSON credentials used to access GCP."
required: true
deploy-args:
description: "Arguments to pass to `gcloud app deploy`."
required: false
Expand All @@ -13,7 +10,9 @@ runs:
- name: 🗝 Authenticate with GCloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ inputs.gcp-credentials }}
project_id: 'decent-digit-629'
workload_identity_provider: 'projects/354656325390/locations/global/workloadIdentityPools/cfl-pool/providers/cfl-provider'
service_account: '[email protected]'

- name: 🤖 Set up GCloud SDK
uses: google-github-actions/setup-gcloud@v2
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
CODECOV_TOKEN:
description: "The token used to gain access to Codecov."
required: false
GCP_CREDENTIALS:
description: "The JSON credentials used to access GCP."
required: false

jobs:
validate-pr-refs:
Expand Down Expand Up @@ -82,5 +79,3 @@ jobs:
- name: 🚀 Deploy App on GCloud
uses: ocadotechnology/codeforlife-workspace/.github/actions/gcloud/deploy-app@main
with:
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}
1 change: 0 additions & 1 deletion .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ jobs:
- name: 🚀 Deploy Cron Jobs on GCloud
uses: ocadotechnology/codeforlife-workspace/.github/actions/gcloud/deploy-app@main
with:
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}
deploy-args: cron.yaml
1 change: 0 additions & 1 deletion .github/workflows/dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ jobs:
- name: 🚀 Deploy Routing Rules on GCloud
uses: ocadotechnology/codeforlife-workspace/.github/actions/gcloud/deploy-app@main
with:
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}
deploy-args: dispatch.yaml
5 changes: 0 additions & 5 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
CODECOV_TOKEN:
description: "The token used to gain access to Codecov."
required: false
GCP_CREDENTIALS:
description: "The JSON credentials used to access GCP."
required: false

jobs:
validate-pr-refs:
Expand Down Expand Up @@ -70,5 +67,3 @@ jobs:
- name: 🚀 Deploy App on GCloud
uses: ocadotechnology/codeforlife-workspace/.github/actions/gcloud/deploy-app@main
with:
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}

0 comments on commit 090124f

Please sign in to comment.