Check Flux CRD Updates #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Flux CRD Updates | |
| on: | |
| schedule: | |
| # Run every Monday at 9 AM UTC | |
| - cron: '0 9 * * 1' | |
| workflow_dispatch: | |
| jobs: | |
| check-crd-updates: | |
| name: Check for Flux CRD Updates | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install kopium | |
| run: cargo install kopium | |
| - name: Fetch latest CRDs and regenerate models | |
| run: make update-flux | |
| - name: Run integration tests | |
| run: make test-integration | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| echo "No CRD or model changes detected." | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| echo "Changed files:" | |
| git diff --name-only | |
| fi | |
| - name: Read updated versions from manifest | |
| if: steps.changes.outputs.changed == 'true' | |
| id: manifest | |
| run: | | |
| { | |
| echo "versions<<EOF" | |
| jq -r '.flux_versions | to_entries[] | "- \(.key): \(.value)"' manifest.json | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: update Flux CRDs to latest versions" | |
| title: "chore: update Flux CRDs to latest versions" | |
| body: | | |
| This PR updates Flux CRDs to the latest versions and regenerates Rust models. | |
| **Updated components:** | |
| ${{ steps.manifest.outputs.versions }} | |
| **Files changed:** | |
| - `scripts/fetch-crds.sh` — updated version manifest | |
| - `crds/*.yaml` — updated CRD definitions | |
| - `src/models/_generated/` — regenerated Rust models | |
| - `manifest.json` — updated version manifest | |
| **Validation:** | |
| - ✅ CRDs fetched and models regenerated via `make update-flux` | |
| - ✅ Build verified via `cargo check` | |
| - ✅ Integration tests passing via `make test-integration` | |
| > Auto-generated by GitHub Actions | |
| branch: update-flux-crds | |
| delete-branch: true |