Skip to content

Commit 78862a2

Browse files
committed
feat(ci): add api docs lint
Signed-off-by: ashing <[email protected]>
1 parent 8ba5d71 commit 78862a2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/lint-checker.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,23 @@ jobs:
7373
max-depth: -1
7474
file-extension: ".md"
7575
check-modified-files-only: "no"
76+
crd-docs-check:
77+
name: Check CRD Docs
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v4
81+
- name: Download crd-ref-docs
82+
run: |
83+
mkdir -p ./bin
84+
curl -L -o ./bin/crd-ref-docs.tar.gz https://github.com/elastic/crd-ref-docs/releases/download/v0.1.0/crd-ref-docs_0.1.0_Linux_x86_64.tar.gz
85+
tar -xzvf ./bin/crd-ref-docs.tar.gz -C ./bin
86+
chmod +x ./bin/crd-ref-docs
87+
- name: Generate CRD Docs
88+
run: |
89+
make generate-crd-docs
90+
- name: Check CRD Docs Diff
91+
run: |
92+
if ! git diff --exit-code -- docs/crd/api.md; then
93+
echo "docs/crd/api.md has changed. Please run 'make generate-crd-docs' and commit the updated file."
94+
exit 1
95+
fi

0 commit comments

Comments
 (0)