@@ -57,18 +57,79 @@ jobs:
5757 with :
5858 node-version : 24.x
5959
60- - name : Install Python Dependencies
61- run : uv pip install pyyaml
60+ - name : Install Python Dependencies and clean up old manifests
61+ run : |-
62+ uv pip install pyyaml requests
63+ rm -rf *
6264
63- - name : Run crd-extractor
64- # yamllint disable rule:line-length
65+ # yamllint disable rule:line-length
66+ - name : Build k8s raw manifests schemas
67+ run : |-
68+ mkdir -p k8s
69+ for manifest in clusterrolebinding-rbac-v1.json \
70+ clusterrole-rbac-v1.json \
71+ mutatingadmissionpolicy-admissionregistration-v1beta1.json \
72+ mutatingadmissionpolicybinding-admissionregistration-v1beta1.json \
73+ namespace-v1.json \
74+ persistentvolumeclaim.json \
75+ resourceclaimtemplate-resource-v1.json \
76+ rolebinding-rbac-v1.json \
77+ role-rbac-v1.json \
78+ secret-v1.json \
79+ serviceaccount-v1.json \
80+ service-v1.json; do \
81+ curl -o "k8s/${manifest}" "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/master/${manifest}"
82+ done
83+
84+ - name : Build k8s CRD manifests schemas
6585 run : |-
6686 curl -fsSL https://raw.githubusercontent.com/datreeio/CRDs-catalog/43e4407642d4c37683c88711f37caa6c9c20ca40/Utilities/crd-extractor.sh | bash
6787
68- rm -rf *
6988 cp -r /home/runner/.datree/crdSchemas/* .
70- # yamllint enable rule:line-length
7189
90+ - name : Build other schemas
91+ run : |-
92+ mkdir -p other
93+ curl -o other/app-template-hr.json https://raw.githubusercontent.com/bjw-s-labs/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
94+ curl -o other/docker-compose.json https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
95+ curl -o other/kromgo.config.json https://raw.githubusercontent.com/kashalls/kromgo/main/config.schema.json
96+ curl -o other/recyclarr.config.json https://raw.githubusercontent.com/recyclarr/recyclarr/master/schemas/config-schema.json
97+ curl -o other/talos.config.json https://raw.githubusercontent.com/siderolabs/talos/refs/heads/main/pkg/machinery/config/schemas/config.schema.json
98+ curl -o other/markdownlint.config.json https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json
99+ curl -o other/sops.config.json https://raw.githubusercontent.com/chri11g6/sops-schema/refs/heads/master/sops.schema.json
100+
101+ cat <<EOF | tee other/labels.json
102+ {
103+ "\$schema": "http://json-schema.org/draft-07/schema",
104+ "\$id": "homelab-labels",
105+ "type": "array",
106+ "items": {
107+ "anyOf": [
108+ {
109+ "type": "object",
110+ "additionalProperties": false,
111+ "properties": {
112+ "name": {
113+ "description": "Name of the label.",
114+ "type": "string"
115+ },
116+ "color": {
117+ "description": "Color of the label.",
118+ "type": "string",
119+ "pattern": "^[0-9a-f]{6}$"
120+ }
121+ },
122+ "required": ["name", "color"]
123+ }
124+ ],
125+ "required": []
126+ }
127+ }
128+ EOF
129+
130+ python3 -c "import requests, yaml, json; print(json.dumps(yaml.safe_load(requests.get('https://raw.githubusercontent.com/borgmatic-collective/borgmatic/main/borgmatic/config/schema.yaml').text), indent=2))" > other/borgmatic.config.json
131+
132+ # yamllint enable rule:line-length
72133 - name : Commit Changes
73134 uses : stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
74135 with :
0 commit comments