forked from distribution/distribution
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.16 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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