Skip to content

Commit e408136

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 c67bde7 commit e408136

File tree

1 file changed

+83
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)