-
Notifications
You must be signed in to change notification settings - Fork 37
34 lines (27 loc) · 1.06 KB
/
docs.yaml
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: Check POLICIES.md is up-to-date
on: [push, pull_request]
# Declare default permissions as read only.
permissions: read-all
jobs:
konstraint_doc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Generate konstraint docs
uses: redhat-cop/github-actions/confbatstest@11f2ce27643eb7c76ac3623cb99d9b08be30d762 # v4
with:
raw: konstraint doc -o POLICIES.md
- name: Check if there are changes to POLICIES.md
id: changes
run: echo "changed=$(git status --porcelain POLICIES.md | wc -l)" >> $GITHUB_OUTPUT
- name: Fail if POLICIES.md changes found
if: steps.changes.outputs.changed >= 1
run: |
echo "Uncommited changes to POLICIES.md exist. Failing."
echo
git status --porcelain
git --no-pager diff POLICIES.md
exit 1
- name: Link checker
uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # 1.0.15