From 4bc2a94bcff70eef46012f9faf4ef042a96985fd Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Mon, 3 Nov 2025 14:42:44 +0000 Subject: [PATCH] CI: Verify generated files This CI verifies if the generated files are up to date in the project and fails if anything has changed. Signed-off-by: Lucas Alvares Gomes --- .github/workflows/verify-generation.yaml | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/verify-generation.yaml diff --git a/.github/workflows/verify-generation.yaml b/.github/workflows/verify-generation.yaml new file mode 100644 index 00000000..d5b0fc39 --- /dev/null +++ b/.github/workflows/verify-generation.yaml @@ -0,0 +1,32 @@ +name: "Verify generated files" + +on: + push: + branches: + - main + pull_request: + +jobs: + verify-generation: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: '1.23' + + - name: Install operator-sdk + uses: redhat-actions/openshift-tools-installer@v1 + with: + source: github + operator-sdk: 1.38.0 + + - name: Verify generated files are up to date and fail if anything changed + run: | + make generate + make manifests + git diff --exit-code