Skip to content

Commit

Permalink
automatically fix warnings for changed CRDs
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <[email protected]>
  • Loading branch information
sebhoss committed Nov 17, 2023
1 parent 9cff7dc commit eda94a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/update-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Dependencies
Expand All @@ -23,6 +25,13 @@ jobs:
run: kopium --version
- name: Generate Resources
run: ./code-generator/generate.sh
- name: Fix changed CRDs
run: |
for module in $(git diff --name-only origin/main -- ./kube-custom-resources-rs/src | grep --invert-match lib.rs | xargs --no-run-if-empty -I{} dirname {} | sort --unique | xargs --no-run-if-empty -I{} basename {}); do
if [ -f "./kube-custom-resources-rs/src/${module}/mod.rs" ]; then
./code-generator/fix-cargo-warnings.sh "${module}"
fi
done
- id: cpr
name: Create Pull Request
uses: peter-evans/create-pull-request@v5
Expand Down

0 comments on commit eda94a5

Please sign in to comment.