2021-08-05 02:44:16 -04:00
|
|
|
name: validate
|
|
|
|
|
2024-07-31 08:19:02 -04:00
|
|
|
# Default to 'contents: read', which grants actions to read commits.
|
|
|
|
#
|
|
|
|
# If any permission is set, any permission not included in the list is
|
|
|
|
# implicitly set to "none".
|
|
|
|
#
|
|
|
|
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
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:
|
2024-06-11 06:55:39 -04:00
|
|
|
runs-on: ubuntu-24.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
|
2024-06-18 04:07:28 -04:00
|
|
|
uses: docker/bake-action@v5
|
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:
|
2024-06-11 06:55:39 -04:00
|
|
|
runs-on: ubuntu-24.04
|
2023-04-12 03:50:38 -04:00
|
|
|
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:
|
2024-06-11 06:55:39 -04:00
|
|
|
runs-on: ubuntu-24.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 }}
|