-
Notifications
You must be signed in to change notification settings - Fork 38
38 lines (36 loc) · 1.02 KB
/
validate-crd-docs.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
name: Validate CRD Docs
on:
pull_request:
branches:
- 'main'
defaults:
run:
shell: bash
jobs:
check-helm-docs:
name: Check crd documentation values
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cache build tools
id: cache-build-tools
uses: actions/cache@v4
with:
path: ./bin
key: build-tools-${{ github.ref_name }}
- name: Check if crds.md is up to date
run: |
cp ./docs/crds.md ./docs/crds-old.md
make generate-crdocs
cd ./docs/
if ! cmp --quiet ./crds-old.md ./crds.md; then
echo "The crd values have changes that are not reflected in the documentation. Please use make generate-crdocs to re-generate the docs."
echo ""
echo "=========== Diff ==========="
diff -u ./crds-old.md ./crds.md
exit 1
else
echo ""
echo "CRDs documentation is correct!"
fi