-
Notifications
You must be signed in to change notification settings - Fork 126
79 lines (72 loc) · 2.3 KB
/
validate-helm-chart.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Validate Helm Chart
on:
push:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
paths:
- "**/chart/**"
pull_request:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
paths:
- "**/chart/**"
# Declare default permissions as read only.
permissions: read-all
defaults:
run:
shell: bash
jobs:
check-helm-docs:
name: Check helm documentation values
runs-on: ubuntu-24.04
strategy:
matrix:
config:
- name: keptn
path: chart
- name: keptn-lifecycle-operator
path: lifecycle-operator/chart
- name: keptn-metrics-operator
path: metrics-operator/chart
- name: keptn-cert-manager
path: keptn-cert-manager/chart
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 16
- name: Install readme generator
run: |
git clone https://github.com/bitnami-labs/readme-generator-for-helm.git
cd ./readme-generator-for-helm
npm ci
npm install --location=global ./
cd ..
- name: Check if Helm doc is up to date for ${{ matrix.config.name }}
run: |
cd ./${{ matrix.config.path }}/
cp ./README.md ./README-old.md
readme-generator --values=./values.yaml --readme=./README.md
if ! cmp --quiet ./README-old.md ./README.md; then
echo "The Helm values for ${{ matrix.config.name }} have changes that are not reflected in the readme."
echo "Please use ./.github/scripts/generate-helm-docs.sh to re-generate the docs."
echo ""
echo "=========== Diff ==========="
diff -u ./README-old.md ./README.md
exit 1
else
echo ""
echo "Helm values documentation for ${{ matrix.config.name }} is correct!"
fi
helm-tests:
name: Run helm tests
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check if Helm template is up to date
run: make helm-test