77 - " .github/workflows/helm-ci.yaml"
88 - " charts/**"
99 - " releases/**"
10- - " docs-site/**"
1110 - " schemas/**"
1211 push :
1312 branches :
1615 - " .github/workflows/helm-ci.yaml"
1716 - " charts/**"
1817 - " releases/**"
19- - " docs-site/**"
2018 - " schemas/**"
2119 workflow_dispatch :
2220
@@ -136,6 +134,9 @@ jobs:
136134
137135 validation_mode="$(yq '.validation.mode' "$manifest")"
138136 validation_status="$(yq '.validation.evidence.status' "$manifest")"
137+ docs_provider="$(yq '.docs.provider // ""' "$manifest")"
138+ docs_version="$(yq '.docs.version // ""' "$manifest")"
139+ docs_state="$(yq '.docs.state // ""' "$manifest")"
139140
140141 if [ "$validation_mode" != "manual" ]; then
141142 echo "::error file=${manifest}::validation.mode must be manual"
@@ -150,6 +151,51 @@ jobs:
150151 ;;
151152 esac
152153
154+ case "$docs_provider" in
155+ readme|self-hosted) ;;
156+ *)
157+ echo "::error file=${manifest}::docs.provider must be readme or self-hosted"
158+ exit 1
159+ ;;
160+ esac
161+
162+ if [ -z "$docs_version" ] || [ "$docs_version" = "null" ]; then
163+ echo "::error file=${manifest}::docs.version is required"
164+ exit 1
165+ fi
166+
167+ case "$docs_state" in
168+ beta|public|hidden|deprecated) ;;
169+ *)
170+ echo "::error file=${manifest}::docs.state must be beta, public, hidden, or deprecated"
171+ exit 1
172+ ;;
173+ esac
174+
175+ if [ "$docs_provider" = "self-hosted" ]; then
176+ docs_source_repo="$(yq '.docs.sourceRepository // ""' "$manifest")"
177+ docs_source_commit="$(yq '.docs.sourceCommit // ""' "$manifest")"
178+ docs_source_format="$(yq '.docs.sourceFormat // ""' "$manifest")"
179+ docs_workflow_run_url="$(yq '.docs.workflowRunUrl // ""' "$manifest")"
180+
181+ if [ "$docs_source_repo" != "eqtylab/governance-platform-docs" ]; then
182+ echo "::error file=${manifest}::self-hosted docs must set docs.sourceRepository=eqtylab/governance-platform-docs"
183+ exit 1
184+ fi
185+ if [ "$docs_source_format" != "mdx" ]; then
186+ echo "::error file=${manifest}::self-hosted docs must set docs.sourceFormat=mdx"
187+ exit 1
188+ fi
189+ if [ -z "$docs_source_commit" ] || [ "$docs_source_commit" = "null" ]; then
190+ echo "::error file=${manifest}::self-hosted docs must set docs.sourceCommit"
191+ exit 1
192+ fi
193+ if [ -z "$docs_workflow_run_url" ] || [ "$docs_workflow_run_url" = "null" ]; then
194+ echo "::error file=${manifest}::self-hosted docs must set docs.workflowRunUrl"
195+ exit 1
196+ fi
197+ fi
198+
153199 images=(authService governanceService governanceStudio integrityService)
154200 if [ "$(yq '.charts.eqtyPdfgen.name // ""' "$manifest")" = "eqty-pdfgen" ]; then
155201 images+=(eqtyPdfgen)
@@ -194,7 +240,7 @@ jobs:
194240
195241 - name : Prevent latest image tags in release-facing files
196242 run : |
197- if grep -RIn --include='*.yaml' --include='*.yml' --include='*.md' ':latest' charts releases docs-site 2>/dev/null; then
243+ if grep -RIn --include='*.yaml' --include='*.yml' --include='*.md' ':latest' charts releases 2>/dev/null; then
198244 echo "::error::Customer release files must not reference latest image tags."
199245 exit 1
200246 fi
0 commit comments