Skip to content

Commit d147c3c

Browse files
committed
lint it
1 parent 8924796 commit d147c3c

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,42 @@ jobs:
5252
- uses: Swatinem/rust-cache@v2
5353
- run: cargo clippy --all-targets --all-features
5454

55+
gen-crds:
56+
name: Generate CRDs
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v6
60+
- name: Configure toolchain
61+
run: |
62+
rustup toolchain install --profile minimal --no-self-update stable
63+
rustup default stable
64+
- uses: Swatinem/rust-cache@v2
65+
- name: Generate CRDs
66+
run: cargo run --bin gen-crds > crds.yaml
67+
- uses: actions/upload-artifact@v4
68+
with:
69+
name: crds
70+
path: crds.yaml
71+
5572
kubeconform:
5673
name: Lint Kubernetes manifests
57-
runs-on: ubuntu-slim
74+
needs: [gen-crds]
75+
runs-on: ubuntu-latest
5876
steps:
5977
- uses: actions/checkout@v6
78+
- uses: actions/download-artifact@v4
79+
with:
80+
name: crds
6081
- name: Install kubeconform
6182
run: |
6283
curl -fsSL https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz \
6384
| tar xz -C /usr/local/bin kubeconform
64-
- run: kubeconform -strict -summary operator.yaml
85+
- run: kubeconform -strict -summary operator.yaml crds.yaml
6586

6687
tests-pass:
6788
if: always()
6889
name: Tests pass
69-
needs: [test, clippy, kubeconform]
90+
needs: [test, clippy, gen-crds, kubeconform]
7091
runs-on: ubuntu-latest
7192
steps:
7293
- uses: re-actors/alls-green@release/v1

0 commit comments

Comments
 (0)