Skip to content

Merge pull request #306 from redhat-cop/renovate/softprops-action-gh-… #682

Merge pull request #306 from redhat-cop/renovate/softprops-action-gh-…

Merge pull request #306 from redhat-cop/renovate/softprops-action-gh-… #682

Workflow file for this run

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: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Generate konstraint docs
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # 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