mirror of
https://github.com/distribution/distribution.git
synced 2025-12-26 17:36:37 +00:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: validate
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'release/*'
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- lint
|
|
- validate-vendor
|
|
- validate-git
|
|
- binaries
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Run
|
|
run: |
|
|
make ${{ matrix.target }}
|
|
env:
|
|
COMMIT_RANGE: ${{ format('{0}..{1}', github.sha, 'HEAD') }}
|
|
|
|
-
|
|
name: Validate docs
|
|
if: matrix.target == 'binaries'
|
|
run: |
|
|
./bin/registry-api-descriptor-template ./docs/content/spec/api.md.tmpl > /tmp/api.md
|
|
echo "Ensure that you have run the following before pushing your commits:
|
|
make binaries
|
|
./bin/registry-api-descriptor-template ./docs/content/spec/api.md.tmpl > ./docs/content/spec/api.md"
|
|
diff docs/content/spec/api.md /tmp/api.md > /dev/null 2>&1
|