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