Try fix otel memory leak #339
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: Docker Build Action | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| release: | |
| types: | |
| - published | |
| push: | |
| branches: | |
| - master | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build: | |
| name: Compile and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.26 | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| cache: false | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Lint Go | |
| uses: golangci/golangci-lint-action@v9 | |
| - name: break if proto modifications where not committed | |
| run: | | |
| make proto | |
| - name: Check if there are changes | |
| uses: tj-actions/verify-changed-files@v20 | |
| id: verify-changed-files | |
| - name: Process changes | |
| if: steps.verify-changed-files.outputs.files_changed == 'true' | |
| run: echo "Changes exist" | |
| - name: build and test | |
| run: | | |
| make ci | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true # optional (default = false) | |
| container: | |
| # TODO skip for external contributors | |
| name: Build Container | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Make tag | |
| run: | | |
| [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true | |
| [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true | |
| [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build and push image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: true | |
| sbom: true | |
| tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }} | |
| bench: | |
| name: Benchmark | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.26 | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| cache: false | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: run benchmark | |
| run: | | |
| make bench | tee output.txt | |
| - name: Download previous benchmark data | |
| uses: actions/cache@v5 | |
| with: | |
| path: ./cache | |
| key: ${{ runner.os }}-benchmark | |
| - name: Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| tool: 'go' | |
| output-file-path: output.txt | |
| external-data-json-path: ./cache/benchmark-data.json | |
| # GitHub API token to make a commit comment | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| fail-on-alert: true |