From 278fbaf08c14ea0e05bfe43d3eda5f86f897fc0a Mon Sep 17 00:00:00 2001 From: yexuanyang Date: Thu, 9 Oct 2025 18:29:04 +0800 Subject: [PATCH 1/2] fix(ci): let ci check go-lint and remove go-lint in Dockerfile In additional, fix the typo errors in Dockerfile --- .github/workflows/linter.yml | 1 + Dockerfile | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index dc166dd..a71e8a3 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -33,3 +33,4 @@ jobs: - uses: ./tools/github-actions/setup-deps - run: make tools - run: make lint + - run: make go-lint diff --git a/Dockerfile b/Dockerfile index eb17107..c2751f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ FROM golang:1.25-alpine3.22 AS golang-builder ARG GOPROXY -# ENV GOPROXY ${GOPROXY:-direct} -# ENV GOPROXY=https://proxy.golang.com.cn,direct +ENV GOPROXY ${GOPROXY:-direct} +ENV GOPROXY=https://proxy.golang.com.cn,direct ENV GOPATH /go ENV GOROOT /usr/local/go @@ -28,11 +28,9 @@ ENV BUILD_DIR /app COPY . ${BUILD_DIR} WORKDIR ${BUILD_DIR} -RUN apk --no-cache add build-base git bash golangci-lint +RUN apk --no-cache add build-base git bash RUN make init && \ - make fmt && \ - make go-lint &&\ make build RUN chmod +x bin/collector @@ -57,7 +55,7 @@ RUN apk update \ && echo "${TIMEZONE}" > /etc/timezone COPY --from=golang-builder /app/bin/collector /usr/local/bin/collector -COPY --from=golang-builder /app/etc/hertzbeat-collector.yml /etc/hertzbeat-collector.yml +COPY --from=golang-builder /app/etc/hertzbeat-collector.yaml /etc/hertzbeat-collector.yaml EXPOSE 8090 -ENTRYPOINT ["collector", "server", "--config", "/etc/hertzbeat-collector.yml"] +ENTRYPOINT ["collector", "server", "--config", "/etc/hertzbeat-collector.yaml"] From f308a228fa394a0e530f8ee437e9a32d50674f6f Mon Sep 17 00:00:00 2001 From: yexuanyang Date: Fri, 10 Oct 2025 17:00:54 +0800 Subject: [PATCH 2/2] Remove make go-lint in linter.yml --- .github/workflows/linter.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index a71e8a3..dc166dd 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -33,4 +33,3 @@ jobs: - uses: ./tools/github-actions/setup-deps - run: make tools - run: make lint - - run: make go-lint