-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.47 KB
/
pvc.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: PVC Pipeline
on:
workflow_dispatch:
push:
branches:
- main
paths:
- k8s/charts/pvc/**/*
- .github/workflows/pvc.yml
jobs:
deploy:
name: Deploy PVC
runs-on: ubuntu-latest
env:
# Google Cloud variables
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }}
PROJECT_NAME: promag
REGION: us-central1
LOCATION: us-central1-a
# Kubernetes variables
CLUSTER_NAME: sit-cluster
NAMESPACE: prod
CHART: pvc
CHART_REPO: k8s/charts/pvc
DEPLOYMENT: pvc
VALUES_FILE: values.yaml
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install the GCloud CLI
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GOOGLE_PROJECT }}
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
install_components: "gke-gcloud-auth-plugin"
export_default_credentials: true
- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
helm repo add stable https://charts.helm.sh/stable
- name: Deploy to GKE
run: |-
gcloud container clusters get-credentials $CLUSTER_NAME --location $LOCATION
helm upgrade --install --namespace $NAMESPACE -f k8s/charts/$CHART/$VALUES_FILE $CHART $CHART_REPO