Bump github.com/gin-contrib/pprof from 1.5.3 to 1.5.4 #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 and publish Docker image | |
| on: | |
| push: | |
| branches: ["main"] | |
| tags: ["v*.*.*"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| - name: Cache Go modules & tools | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| ~/go/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Test | |
| run: | | |
| export PATH=$(go env GOPATH)/bin:$PATH | |
| go install gotest.tools/gotestsum@latest | |
| mkdir -p ./test-reports/ | |
| gotestsum --junitfile=./test-reports/junit.xml --format github-actions -- -v -coverprofile=profile.cov -coverpkg=./... ./... | |
| - name: Collect test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-reports | |
| path: ./test-reports/ | |
| - name: Publish test results | |
| uses: mikepenz/action-junit-report@v6 | |
| if: always() | |
| with: | |
| report_paths: "./test-reports/junit.xml" | |
| comment: true | |
| include_passed: true | |
| detailed_summary: true | |
| - name: Upload coverage to Coveralls | |
| uses: shogo82148/actions-goveralls@v1 | |
| continue-on-error: true | |
| with: | |
| path-to-profile: profile.cov | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v9 | |
| docker-publish: | |
| concurrency: | |
| group: "publishing" | |
| needs: | |
| - build-and-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository with full history | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: "Log into registry: ${{ env.REGISTRY }}" | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=semver,pattern=v{{version}} | |
| type=semver,pattern=v{{major}}.{{minor}} | |
| type=semver,pattern=v{{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} | |
| type=sha | |
| labels: | | |
| maintainer=rm-hull | |
| org.opencontainers.image.description=REST API for GPS routes | |
| org.opencontainers.image.licenses=MIT | |
| - name: Build and push Docker image | |
| id: build-and-push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64 #,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |