...

Text file src/github.com/docker/cli/.github/workflows/validate.yml

Documentation: github.com/docker/cli/.github/workflows

     1name: validate
     2
     3concurrency:
     4  group: ${{ github.workflow }}-${{ github.ref }}
     5  cancel-in-progress: true
     6
     7on:
     8  workflow_dispatch:
     9  push:
    10    branches:
    11      - 'master'
    12      - '[0-9]+.[0-9]+'
    13    tags:
    14      - 'v*'
    15  pull_request:
    16
    17jobs:
    18  validate:
    19    runs-on: ubuntu-22.04
    20    strategy:
    21      fail-fast: false
    22      matrix:
    23        target:
    24          - lint
    25          - shellcheck
    26          - validate-vendor
    27          - update-authors # ensure authors update target runs fine
    28    steps:
    29      -
    30        name: Checkout
    31        uses: actions/checkout@v4
    32      -
    33        name: Run
    34        uses: docker/bake-action@v4
    35        with:
    36          targets: ${{ matrix.target }}
    37
    38  # check that the generated Markdown and the checked-in files match
    39  validate-md:
    40    runs-on: ubuntu-22.04
    41    steps:
    42      -
    43        name: Checkout
    44        uses: actions/checkout@v4
    45      -
    46        name: Generate
    47        shell: 'script --return --quiet --command "bash {0}"'
    48        run: |
    49          make -f docker.Makefile mddocs
    50      -
    51        name: Validate
    52        run: |
    53          if [[ $(git diff --stat) != '' ]]; then
    54            echo 'fail: generated files do not match checked-in files'
    55            git --no-pager diff
    56            exit 1
    57          fi
    58
    59  validate-make:
    60    runs-on: ubuntu-22.04
    61    strategy:
    62      fail-fast: false
    63      matrix:
    64        target:
    65          - yamldocs # ensure yamldocs target runs fine
    66          - manpages # ensure manpages target runs fine
    67    steps:
    68      -
    69        name: Checkout
    70        uses: actions/checkout@v4
    71      -
    72        name: Run
    73        shell: 'script --return --quiet --command "bash {0}"'
    74        run: |
    75          make -f docker.Makefile ${{ matrix.target }}

View as plain text