mirror of https://github.com/docker/cli.git
ci: add validation for generated markdown
Signed-off-by: David Karlsson <david.karlsson@docker.com>
(cherry picked from commit 25ed7847ec
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ced769fc12
commit
4a42917081
|
@ -37,6 +37,27 @@ jobs:
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
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:
|
validate-make:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
|
|
Loading…
Reference in New Issue