-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (32 loc) · 1018 Bytes
/
Copy pathcli-reference-check.yml
File metadata and controls
36 lines (32 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: cli-reference-check
# PILOT-54: regenerates docs/cli-reference.md from `pilotctl --help` and
# fails if the committed copy is stale. Stops doc drift from being a
# silent contributor problem — drift becomes a CI red.
on:
push:
branches: [main]
pull_request:
paths:
- 'cmd/pilotctl/**'
- 'docs/cli-reference.md'
- 'scripts/gen-cli-reference.sh'
- '.github/workflows/cli-reference-check.yml'
permissions:
contents: read
jobs:
check:
name: docs/cli-reference.md up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Regenerate
run: scripts/gen-cli-reference.sh
- name: Diff committed vs regenerated
run: |
if ! git diff --exit-code docs/cli-reference.md; then
echo "::error::docs/cli-reference.md is stale. Run scripts/gen-cli-reference.sh and commit the result."
exit 1
fi