From 4a42917081386aecc59895b3dfbef14b53181e02 Mon Sep 17 00:00:00 2001 From: David Karlsson Date: Wed, 12 Apr 2023 09:50:38 +0200 Subject: [PATCH] ci: add validation for generated markdown Signed-off-by: David Karlsson (cherry picked from commit 25ed7847ec07e5f1446794ec70aa2ac5bae4350e) Signed-off-by: Sebastiaan van Stijn --- .github/workflows/validate.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 30dd186806..a2963ca298 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -37,6 +37,27 @@ jobs: with: targets: ${{ matrix.target }} + # check that the generated Markdown and the checked-in files match + validate-md: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Generate + shell: 'script --return --quiet --command "bash {0}"' + run: | + make -f docker.Makefile mddocs + - + name: Validate + run: | + if [[ $(git diff --stat) != '' ]]; then + echo 'fail: generated files do not match checked-in files' + git --no-pager diff + exit 1 + fi + validate-make: runs-on: ubuntu-20.04 strategy: