Skip to content

Commit 0af21fc

Browse files
committed
workflows: Let's ensure our docs are in sync with kata-deploy ones
This is very easy to get out of sync, but we must ensure that for any kata-deploy helm chart bump that we do, we sync the documentation. Again, vibe generated with Cursor AI. :-) Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
1 parent 99f431f commit 0af21fc

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Validate Documentation
2+
3+
on:
4+
pull_request:
5+
types:
6+
- edited
7+
- opened
8+
- reopened
9+
- synchronize
10+
schedule:
11+
# Run weekly on Monday at 9:00 UTC to catch upstream changes
12+
- cron: '0 9 * * 1'
13+
workflow_dispatch:
14+
15+
jobs:
16+
validate-kata-deploy-docs:
17+
name: Validate kata-deploy Configuration Documentation
18+
runs-on: ubuntu-22.04
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Helm
25+
uses: azure/setup-helm@v4
26+
with:
27+
version: '3.14.0'
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
34+
- name: Install Python dependencies
35+
run: |
36+
pip install pyyaml requests
37+
38+
- name: Update Helm dependencies
39+
run: |
40+
cd ${{ github.workspace }}
41+
helm dependency update
42+
43+
- name: Extract kata-deploy chart
44+
run: |
45+
cd ${{ github.workspace }}
46+
mkdir -p /tmp/kata-deploy-extracted
47+
tar -xzf charts/kata-deploy-*.tgz -C /tmp/kata-deploy-extracted
48+
49+
- name: Validate documentation coverage
50+
id: validate
51+
run: |
52+
python .github/scripts/validate-kata-deploy-options.py \
53+
--kata-deploy-chart /tmp/kata-deploy-extracted/kata-deploy \
54+
--our-values values.yaml \
55+
--our-docs README.md QUICKSTART.md \
56+
--output-format github
57+
58+
- name: Comment on PR (if applicable)
59+
if: failure() && github.event_name == 'pull_request'
60+
uses: actions/github-script@v7
61+
with:
62+
script: |
63+
const fs = require('fs');
64+
const reportPath = '/tmp/validation-report.md';
65+
66+
if (fs.existsSync(reportPath)) {
67+
const report = fs.readFileSync(reportPath, 'utf8');
68+
69+
github.rest.issues.createComment({
70+
issue_number: context.issue.number,
71+
owner: context.repo.owner,
72+
repo: context.repo.repo,
73+
body: report
74+
});
75+
}
76+
77+
- name: Upload validation report
78+
if: always()
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: documentation-validation-report
82+
path: /tmp/validation-report.md
83+
if-no-files-found: ignore
84+

0 commit comments

Comments
 (0)