Skip to content

Commit d922417

Browse files
committed
feat(actions): Ensure that CRDs are not out of date
Signed-off-by: Matthew H. Irby <[email protected]>
1 parent 9b4c278 commit d922417

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/keyfactor-bootstrap-workflow.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313

1414
build:
15-
name: Build and Lint
15+
name: Build and Check CRDs
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 8
1818
steps:
@@ -23,11 +23,17 @@ jobs:
2323
cache: true
2424
- run: go mod download
2525
- run: go build -v ./cmd/main.go
26+
- name: Regenerate CRDs
27+
run: make generate manifests
28+
- name: Check for CRD drift
29+
run: |
30+
git diff --compact-summary --exit-code || \
31+
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate manifests' and commit."; exit 1)
2632
# - name: Run linters
2733
# uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
2834
# with:
2935
# version: latest
30-
36+
3137
test:
3238
name: Go Test
3339
needs: build

0 commit comments

Comments
 (0)