Skip to content

Commit 25ed784

Browse files
committed
ci: add validation for generated markdown
Signed-off-by: David Karlsson <david.karlsson@docker.com>
1 parent fff5a31 commit 25ed784

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/validate.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@ jobs:
3737
with:
3838
targets: ${{ matrix.target }}
3939

40+
# check that the generated Markdown and the checked-in files match
41+
validate-md:
42+
runs-on: ubuntu-20.04
43+
steps:
44+
-
45+
name: Checkout
46+
uses: actions/checkout@v3
47+
-
48+
name: Generate
49+
shell: 'script --return --quiet --command "bash {0}"'
50+
run: |
51+
make -f docker.Makefile mddocs
52+
-
53+
name: Validate
54+
run: |
55+
if [[ $(git diff --stat) != '' ]]; then
56+
echo 'fail: generated files do not match checked-in files'
57+
git --no-pager diff
58+
exit 1
59+
fi
60+
4061
validate-make:
4162
runs-on: ubuntu-20.04
4263
strategy:

0 commit comments

Comments
 (0)