-
Notifications
You must be signed in to change notification settings - Fork 199
36 lines (35 loc) · 1.01 KB
/
verify-api-crds.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
name: verify api CRDs
on:
pull_request:
jobs:
verify-api-crds:
defaults:
run:
working-directory: ./api
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: install controller-gen
run: make controller-gen
- name: Check API CRDs
run: make generate && make manifests
- name: Verify Generate
run: |
if [[ $(git diff --exit-code) ]]; then
git diff
echo "api CRDs are not up to date. Please run 'make generate && make manifests' and commit the changes."
exit 1
fi
- name: Generate client files
run: make generate-client
- name: Verify Generate
run: |
if [[ $(git diff --exit-code) ]]; then
git diff
echo "client files are not up to date. Please run 'make generate-client' and commit the changes."
exit 1
fi