fix golang ci lint issue #21
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: ci | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| pull_request_target: | |
| types: | |
| - labeled | |
| jobs: | |
| fmt: | |
| if: | | |
| (github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) || | |
| (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test')) | |
| uses: signoz/primus.workflows/.github/workflows/go-fmt.yaml@main | |
| secrets: inherit | |
| with: | |
| PRIMUS_REF: main | |
| GO_VERSION: 1.25 | |
| lint: | |
| if: | | |
| (github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) || | |
| (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test')) | |
| uses: signoz/primus.workflows/.github/workflows/go-lint.yaml@main | |
| secrets: inherit | |
| with: | |
| PRIMUS_REF: main | |
| GO_VERSION: 1.25 | |
| test: | |
| if: | | |
| (github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) || | |
| (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test')) | |
| uses: signoz/primus.workflows/.github/workflows/go-test.yaml@main | |
| secrets: inherit | |
| with: | |
| PRIMUS_REF: main | |
| GO_TEST_CONTEXT: ./... | |
| GO_VERSION: 1.25 | |
| deps: | |
| if: | | |
| (github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) || | |
| (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test')) | |
| uses: signoz/primus.workflows/.github/workflows/go-deps.yaml@main | |
| secrets: inherit | |
| with: | |
| PRIMUS_REF: main | |
| GO_VERSION: 1.25 | |
| build: | |
| if: | | |
| (github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) || | |
| (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test')) | |
| uses: signoz/primus.workflows/.github/workflows/go-build.yaml@main | |
| secrets: inherit | |
| with: | |
| PRIMUS_REF: main | |
| GO_BUILD_CONTEXT: ./cmd/server | |
| GO_VERSION: 1.25 | |
| GO_BUILD_FLAGS: "" | |
| DOCKER_BASE_IMAGES: '{"distroless":"gcr.io/distroless/base:latest"}' | |
| DOCKER_DOCKERFILE_PATH: Dockerfile.multi-arch | |
| DOCKER_MANIFEST: false |