Skip to content

Commit

Permalink
Update workflows for gcloud access
Browse files Browse the repository at this point in the history
  • Loading branch information
wraitii committed Jan 5, 2023
1 parent 6495f65 commit 16832d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}

# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- run: |-
Expand All @@ -30,7 +34,6 @@ jobs:
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
credentials: ${{ secrets.GCP_SA_KEY }}

- uses: actions/setup-node@v2
with:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: deploy
on:
push:
branches: [ main ]
branches: [ main, next ]
env:
GKE_CLUSTER: sltech-briq-k8s-cluster
GKE_ZONE: europe-west3-c
Expand All @@ -15,12 +15,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v2


- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}

# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- run: |-
Expand All @@ -31,7 +34,6 @@ jobs:
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
credentials: ${{ secrets.GCP_SA_KEY }}

- uses: actions/setup-node@v2
with:
Expand Down

0 comments on commit 16832d2

Please sign in to comment.