Skip to content

Commit de0ab51

Browse files
authored
chore: Makes sure doc generation is up-to-date (#2441)
* generate doc * split in runs * detect changes * TEMPORARY: change 3 files to trigger doc failures * rename * Revert "TEMPORARY: change 3 files to trigger doc failures" This reverts commit cc36481.
1 parent 214b694 commit de0ab51

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/code-health.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,30 @@ jobs:
6060
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
6161
- name: Run ShellCheck
6262
uses: bewuethr/shellcheck-action@d01912909579c4b1a335828b8fca197fbb8e0aa4
63+
generate-doc-check:
64+
runs-on: ubuntu-latest
65+
permissions: {}
66+
steps:
67+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
68+
- run: make tools # all resources with auto-generated doc must be specified below here
69+
- name: Doc for control_plane_ip_addresses
70+
run: export resource_name=control_plane_ip_addresses && make generate-doc
71+
- name: Doc for push_based_log_export
72+
run: export resource_name=push_based_log_export && make generate-doc
73+
- name: Doc for search_deployment
74+
run: export resource_name=search_deployment && make generate-doc
75+
- name: Find mutations
76+
id: self_mutation
77+
run: |-
78+
git add .
79+
git diff --staged --patch --exit-code > .repo.patch || echo "self_mutation_happened=true" >> "${GITHUB_OUTPUT}"
80+
- name: Fail build on mutation
81+
if: steps.self_mutation.outputs.self_mutation_happened
82+
run: |-
83+
echo "::error::Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch."
84+
cat .repo.patch
85+
exit 1
6386
call-acceptance-tests-workflow:
64-
needs: [build, lint, shellcheck, unit-test]
87+
needs: [build, lint, shellcheck, unit-test, generate-doc-check]
6588
secrets: inherit
6689
uses: ./.github/workflows/acceptance-tests.yml

0 commit comments

Comments
 (0)