-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.17 KB
/
deploy-client.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: deploy-client
on:
push:
branches:
- main
paths:
- 'client/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd client && docker build -t vishnumohanan/client .
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
- run: docker push vishnumohanan/client
- name: Authenticate with Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GKE_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: "latest"
project_id: ${{ secrets.GKE_PROJECT_ID }}
- name: Install gke-gcloud-auth-plugin
run: gcloud components install gke-gcloud-auth-plugin
- name: Configure kubectl
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }}
- run: kubectl rollout restart deployment client-depl