File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
crates/stackable-crd-previewer Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,27 @@ jobs:
102102 - run : cargo test --no-default-features --workspace
103103 - run : cargo test --all-features --workspace
104104
105+ check_crd_previews :
106+ name : Check if CRD previews are up to date
107+ runs-on : ubuntu-latest
108+ steps :
109+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110+ with :
111+ persist-credentials : false
112+ - uses : dtolnay/rust-toolchain@master
113+ with :
114+ toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
115+ - name : Regenerate CRD previews
116+ run : cargo check -p stackable-crd-previewer
117+ - name : Check if committed CRD previews were up to date
118+ run : git diff --exit-code generated-crd-previews
119+ - name : Git Diff showed uncommitted changes
120+ if : ${{ failure() }}
121+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
122+ with :
123+ script : |
124+ core.setFailed('Committed CRD previews were not up to date, please run "cargo check -p stackable-crd-previewer" and re-commit!')
125+
105126 tests_passed :
106127 name : All tests passed
107128 needs :
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pub enum Error {
3737}
3838
3939pub fn main ( ) -> Report < Error > {
40- Report :: capture ( || write_crds ( ) )
40+ Report :: capture ( write_crds)
4141}
4242
4343macro_rules! write_crd {
You can’t perform that action at this time.
0 commit comments