Skip to content

Commit e97273b

Browse files
committed
Update actions
1 parent 4e6c691 commit e97273b

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

.github/workflows/buildandDeploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ jobs:
6969
- id: 'get-credentials'
7070
uses: 'google-github-actions/get-gke-credentials@v1'
7171
with:
72-
cluster_name: 'promhub'
72+
cluster_name: ${{ secrets.CLUSTER_NAME }}
7373
location: 'us-central1-a'
74-
project_id: 198600064581
74+
project_id: ${{ secrets.PROJECT_ID }}
7575

7676
- name: Deploy in staging
7777
run: |

.github/workflows/production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: testAndBuild
3+
name: Production Build
44

55
# Controls when the action will run. Triggers the workflow on push or pull request
66
# events but only for the master branch

.github/workflows/productionDeploy.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ jobs:
2020
chmod +x ./kubectl
2121
sudo mv ./kubectl /usr/local/bin/kubectl
2222
23-
- name: Deploy in production
24-
env:
25-
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
26-
run: |
27-
echo "$GOOGLE_APPLICATION_CREDENTIALS" | base64 --decode > /tmp/config
28-
export GOOGLE_APPLICATION_CREDENTIALS=/tmp/config
29-
export KUBECONFIG=deployment/promhub_kubeconfig
30-
chmod +x deployment/master/deploy.sh
31-
sh ./deployment/master/deploy.sh
23+
- id: 'auth'
24+
name: 'Authenticate to Google Cloud'
25+
uses: 'google-github-actions/auth@v1'
26+
with:
27+
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
28+
29+
- id: 'get-credentials'
30+
uses: 'google-github-actions/get-gke-credentials@v1'
31+
with:
32+
cluster_name: ${{ secrets.CLUSTER_NAME }}
33+
location: 'us-central1-a'
34+
project_id: ${{ secrets.PROJECT_ID }}

0 commit comments

Comments
 (0)