1- name : Helm Values Schema
1+ name : Helm Docs
22
33on :
44 pull_request :
77 paths :
88 - " deploy/helm/values.yaml"
99 - " deploy/helm/values.schema.json"
10- - " .github/workflows/helm-schema.yml"
10+ - " deploy/helm/README.md"
11+ - " deploy/helm/README.md.gotmpl"
12+ - " .github/workflows/helm-docs.yml"
1113 workflow_dispatch :
1214
1315jobs :
@@ -21,10 +23,10 @@ jobs:
2123
2224 steps :
2325 - name : Checkout the code
24- uses : actions/checkout@v4
26+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2527
2628 - name : Install Helm
27- uses : azure/setup-helm@v4
29+ uses : azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
2830 with :
2931 # Helm 4 — pinned so we don't silently track future major bumps.
3032 version : v4.1.4
@@ -34,18 +36,38 @@ jobs:
3436 # (the plugin source doesn't ship verification metadata).
3537 run : helm plugin install --verify=false https://github.com/losisin/helm-values-schema-json.git
3638
37- - name : Regenerate schema from values.yaml
39+ - name : Install helm-docs
40+ run : |
41+ HELM_DOCS_VERSION=1.14.2
42+ BASE_URL="https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}"
43+ TARBALL="helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz"
44+ curl -sSL "${BASE_URL}/checksums.txt" -o checksums.txt
45+ curl -sSL "${BASE_URL}/${TARBALL}" -o "${TARBALL}"
46+ sha256sum --check --ignore-missing checksums.txt
47+ tar xzf "${TARBALL}" helm-docs
48+ sudo mv helm-docs /usr/local/bin/
49+
50+ - name : Check values schema
3851 run : |
3952 helm schema \
4053 --schema-root.title "Appsmith Helm chart values" \
4154 --schema-root.id "https://helm.appsmith.com/values.schema.json" \
4255 -o values.schema.json.regenerated
4356
44- - name : Fail if committed schema is out of date
45- run : |
4657 if ! diff -u values.schema.json values.schema.json.regenerated; then
4758 echo ""
4859 echo "::error::values.schema.json is out of date. Regenerate locally with:"
4960 echo "::error:: cd deploy/helm && helm schema --schema-root.title 'Appsmith Helm chart values' --schema-root.id 'https://helm.appsmith.com/values.schema.json' -o values.schema.json"
5061 exit 1
5162 fi
63+
64+ - name : Check README
65+ run : |
66+ helm-docs --sort-values-order file --dry-run > README.md.regenerated
67+
68+ if ! diff -u README.md README.md.regenerated; then
69+ echo ""
70+ echo "::error::README.md is out of date. Regenerate locally with:"
71+ echo "::error:: cd deploy/helm && helm-docs --sort-values-order file"
72+ exit 1
73+ fi
0 commit comments