-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
59 lines (52 loc) · 1.42 KB
/
action.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
58
59
name: "sitkoru/k8s-deployment-action"
description: "Action to manage Kubernetes Deployments"
branding:
icon: "package"
color: "blue"
inputs:
version:
description: "Service version"
required: true
config:
description: "Kubernetes config"
required: true
common_env:
description: "Common environments"
required: true
app_values_path:
description: "Application environments"
required: true
app:
description: "Application name"
required: true
namespace:
description: "Application namespace"
required: true
runs:
using: "composite"
steps:
- uses: azure/setup-kubectl@v3
name: Install kubectl
id: install-kubectl
- uses: azure/setup-helm@v4
name: Install helm
id: install-helm
- uses: Azure/k8s-set-context@v3
name: Set k8s context
with:
kubeconfig: ${{ inputs.config }}
- name: Install chart repo
shell: bash
run: |
helm repo add sitkoru https://sitkoru.github.io/helm-charts/
helm repo update
- name: Write common secret to file
shell: bash
run: |
cat << EOF > .helm/env.yml
${{ inputs.common_env }}
EOF
- name: Deploy
shell: bash
run: |
helm upgrade -i -f ${{ inputs.app_values_path }} -f .helm/env.yml --set image.tag=${{ inputs.version }} ${{ inputs.app }} -n ${{ inputs.namespace }} sitkoru/dotnet-app --atomic --history-max 5