-
Notifications
You must be signed in to change notification settings - Fork 524
34 lines (34 loc) · 1.26 KB
/
doc-validator.yml
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
name: "doc-validator"
on:
pull_request:
paths: ["docs/sources/**"]
workflow_dispatch:
jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:v5.2.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Run doc-validator"
run: |
rm -rf /hugo/content/docs
mkdir -p /hugo/content/docs/tempo
mkdir -p /hugo/content/docs/helm-charts/tempo-distributed
mv "$(pwd)/docs/sources/tempo" /hugo/content/docs/tempo/latest
mv "$(pwd)/docs/sources/helm-charts/tempo-distributed" /hugo/content/docs/helm-charts/tempo-distributed/next
doc-validator \
'--skip-checks=^image' \
/hugo/content/docs \
/docs/tempo/latest \
| sed -E s,/hugo/content/docs/tempo/latest,docs/sources/tempo,g \
| sed -E s,/hugo/content/docs/helm-charts/tempo-distributed/next,/docs/sources/helm-charts/tempo-distributed,g \
| reviewdog \
-f=rdjsonl \
--fail-on-error \
--filter-mode=nofilter \
--name=doc-validator \
--reporter=github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"