-
Notifications
You must be signed in to change notification settings - Fork 4.8k
51 lines (43 loc) · 1.63 KB
/
Copy pathhelm-schema.yml
File metadata and controls
51 lines (43 loc) · 1.63 KB
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
name: Helm Values Schema
on:
pull_request:
branches:
- release
paths:
- "deploy/helm/values.yaml"
- "deploy/helm/values.schema.json"
- ".github/workflows/helm-schema.yml"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: deploy/helm
shell: bash
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
with:
# Helm 4 — pinned so we don't silently track future major bumps.
version: v4.1.4
- name: Install helm-values-schema-json plugin
# --verify=false is required by Helm 4's stricter plugin install path
# (the plugin source doesn't ship verification metadata).
run: helm plugin install --verify=false https://github.com/losisin/helm-values-schema-json.git
- name: Regenerate schema from values.yaml
run: |
helm schema \
--schema-root.title "Appsmith Helm chart values" \
--schema-root.id "https://helm.appsmith.com/values.schema.json" \
-o values.schema.json.regenerated
- name: Fail if committed schema is out of date
run: |
if ! diff -u values.schema.json values.schema.json.regenerated; then
echo ""
echo "::error::values.schema.json is out of date. Regenerate locally with:"
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"
exit 1
fi