Diff check and Manifest generation in GitHub Actions

Diff check and manifest generation GitHub Actions For Go projects it’s crucial that you don’t forget to run go mod tidy from time to time. Combine that with a project that includes Kubernetes controllers and the other thing people tend to forget is running make manifest && make generate. To check for these I added a small GitHub action that looks like this: name: Check for diff after manifest and generated targets on: pull_request: {} jobs: diff-check-manifests: name: Check for diff runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Make manifests && generate run: | make manifests && make generate - name: Setup Go uses: actions/setup-go@v3 with: go-version-file: '${{ github....

August 11, 2023 · 1 min · hannibal