-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.7 KB
/
gke-helm-upgrade.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
55
56
57
---
name: GKE Helm Upgrade
on:
workflow_call:
secrets:
WORKLOAD_ID_PROVIDER:
required: true
SERVICE_ACCOUNT:
required: true
inputs:
GCP_PROJECT:
required: true
type: string
GKE_CLUSTER:
required: true
type: string
GKE_REGION:
required: true
type: string
HELM_RELEASE:
required: true
type: string
HELM_CHART_DIR:
required: true
type: string
HELM_VALUES:
required: true
type: string
jobs:
helm-upgrade:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: auth
id: gcloud_auth
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.WORKLOAD_ID_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
project_id: ${{ inputs.GCP_PROJECT }}
token_format: access_token
- name: get-gke-credentials
id: get-gke-credentials
uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: ${{ inputs.GKE_CLUSTER }}
location: ${{ inputs.GKE_REGION }}
- name: helm-upgrade
id: helm-upgrade
run: helm upgrade ${{ inputs.HELM_RELEASE }} ${{ inputs.HELM_CHART_DIR }}/ --values ${{ inputs.HELM_VALUES }} --atomic --install