name: build on: workflow_dispatch: pull_request: branches: - main push: branches: - main permissions: contents: read jobs: build-flagger: runs-on: group: "Default Larger Runners" labels: ubuntu-latest-16-cores steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: 1.25.x cache-dependency-path: | **/go.sum **/go.mod - name: Download modules run: | go mod download go install golang.org/x/tools/cmd/goimports@latest - name: Run linters run: make fmt test-codegen - name: Verify CRDs run: make verify-crd - name: Run tests run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...) - name: Check if working tree is dirty run: | if [[ $(git diff --stat) != '' ]]; then git --no-pager diff echo 'run make test and commit changes' exit 1 fi - name: Upload coverage to Codecov uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 with: file: ./coverage.txt - name: Build container image run: docker build -t test/flagger:latest .