-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 1.73 KB
/
deploy-with-helm.yaml
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
58
59
60
61
62
63
64
65
66
67
68
name: Release service with helm.
on:
workflow_call:
inputs:
runs-on:
required: true
description: Platform to execute on
type: string
helm-repo-path:
required: true
type: string
helm-release:
required: true
type: string
namespace:
required: true
type: string
tag:
required: true
type: string
environment:
required: true
type: string
secrets:
TRIGGER_GITHUB_TOKEN:
required: true
HELM_VERSION:
required: true
KUBECTL_VERSION:
required: true
K8S_DEPLOYMENT_CONFIGS_REPOSITORY:
required: true
jobs:
deploy:
name: Upgrade service with helm.
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
- uses: actions/checkout@v3
with:
repository: ${{ secrets.K8S_DEPLOYMENT_CONFIGS_REPOSITORY }}
token: ${{ secrets.TRIGGER_GITHUB_TOKEN }}
- uses: azure/setup-helm@v1
with:
version: ${{ secrets.HELM_VERSION }}
- uses: azure/setup-kubectl@v1
with:
version: ${{ secrets.KUBECTL_VERSION }}
- name: Deploy
env:
HELM_RELEASE: ${{ inputs.helm-release }}
HELM_REPO_PATH: ${{ inputs.helm-repo-path }}
NAMESPACE: ${{ inputs.namespace }}
ENVIRONMENT: ${{ inputs.environment }}
TAG: ${{ inputs.tag }}
run: |
helm upgrade --install ${HELM_RELEASE} ${HELM_REPO_PATH} \
-f ${HELM_REPO_PATH}/envs/${ENVIRONMENT}.yaml \
--set image.tag=${TAG} \
--set global.image.tag=${TAG} \
--debug --atomic --cleanup-on-fail \
--timeout 10m \
-n ${NAMESPACE}