2021-08-05 09:44:16 +03:00
|
|
|
name: validate
|
|
|
|
|
2022-08-18 21:03:28 +03:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-08-05 09:44:16 +03:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
2023-02-09 20:03:11 +03:00
|
|
|
- '[0-9]+.[0-9]+'
|
2021-08-05 09:44:16 +03:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2021-12-16 23:15:53 +03:00
|
|
|
validate:
|
2024-02-13 16:30:09 +03:00
|
|
|
runs-on: ubuntu-22.04
|
2021-08-05 09:44:16 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
target:
|
|
|
|
- lint
|
|
|
|
- shellcheck
|
2021-12-16 23:15:53 +03:00
|
|
|
- validate-vendor
|
2021-12-21 03:44:40 +03:00
|
|
|
- update-authors # ensure authors update target runs fine
|
2021-08-05 09:44:16 +03:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 11:37:30 +03:00
|
|
|
uses: actions/checkout@v4
|
2021-08-05 09:44:16 +03:00
|
|
|
-
|
|
|
|
name: Run
|
2023-09-12 12:29:01 +03:00
|
|
|
uses: docker/bake-action@v4
|
2021-08-05 09:44:16 +03:00
|
|
|
with:
|
|
|
|
targets: ${{ matrix.target }}
|
2022-02-25 19:11:04 +03:00
|
|
|
|
2023-04-12 10:50:38 +03:00
|
|
|
# check that the generated Markdown and the checked-in files match
|
|
|
|
validate-md:
|
2024-02-13 16:30:09 +03:00
|
|
|
runs-on: ubuntu-22.04
|
2023-04-12 10:50:38 +03:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 11:37:30 +03:00
|
|
|
uses: actions/checkout@v4
|
2023-04-12 10:50:38 +03:00
|
|
|
-
|
|
|
|
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
|
|
|
|
|
2022-02-25 19:11:04 +03:00
|
|
|
validate-make:
|
2024-02-13 16:30:09 +03:00
|
|
|
runs-on: ubuntu-22.04
|
2022-02-25 19:11:04 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
target:
|
|
|
|
- yamldocs # ensure yamldocs target runs fine
|
2022-02-25 19:05:35 +03:00
|
|
|
- manpages # ensure manpages target runs fine
|
2022-02-25 19:11:04 +03:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 11:37:30 +03:00
|
|
|
uses: actions/checkout@v4
|
2022-02-25 19:11:04 +03:00
|
|
|
-
|
|
|
|
name: Run
|
2022-02-25 19:05:35 +03:00
|
|
|
shell: 'script --return --quiet --command "bash {0}"'
|
2022-02-25 19:11:04 +03:00
|
|
|
run: |
|
|
|
|
make -f docker.Makefile ${{ matrix.target }}
|