Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WIF instead of service account key #119

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}