[patch] Limit retry hints to pre-dispatch failures #160
Workflow file for this run
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: build-push | |
| on: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9 | |
| with: | |
| version: v2.12.2 | |
| - name: Install dependencies | |
| run: | | |
| go mod download | |
| go mod verify | |
| - run: go build | |
| - name: unit test | |
| run: go test -race -v ./... | |
| - name: coverage | |
| run: go test -v -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: upload coverage to codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6 | |
| with: | |
| files: ./coverage.out | |
| fail_ci_if_error: false | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # PPB is public in GHCR and also runs on Cloud Run. The shared workflow | |
| # builds and scans each native image once, then publishes the same digest to | |
| # both registries. | |
| publish: | |
| if: github.event_name != 'pull_request' | |
| needs: [lint-test] | |
| uses: libops/.github/.github/workflows/build-push.yaml@65e48647a77fd87452424b03978b334ae03aee84 # main | |
| with: | |
| ref: ${{ github.sha }} | |
| expected-main-sha: ${{ github.ref == 'refs/heads/main' && github.sha || '' }} | |
| additional-gar-registry: us-docker.pkg.dev/libops-images/public | |
| scan: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| secrets: inherit |