Skip to content

Commit f66c14f

Browse files
committed
fix: set an explicit GOROOT for go-critic
1 parent 5e14049 commit f66c14f

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

Diff for: .gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
go.sum linguist-generated
2-
Dockerfile.* linguist-language=Dockerfile

Diff for: .github/workflows/tag.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
matrix:
3838
target:
3939
- Dockerfile: build/Dockerfile
40-
- Dockerfile: build/Dockerfile.alpine
40+
- Dockerfile: build/alpine.Dockerfile
4141
steps:
4242
- uses: actions/checkout@v3
4343

Diff for: build/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X
1111

1212
# stage 2
1313
FROM golang:1.19
14+
# related to https://github.com/golangci/golangci-lint/issues/3107
15+
ENV GOROOT /usr/local/go
1416
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
1517
COPY --from=builder /golangci/golangci-lint /usr/bin/
1618
CMD ["golangci-lint"]

Diff for: build/Dockerfile.alpine renamed to build/alpine.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X
1616

1717
# stage 2
1818
FROM golang:1.19-alpine
19+
# related to https://github.com/golangci/golangci-lint/issues/3107
20+
ENV GOROOT /usr/local/go
1921
# gcc is required to support cgo;
2022
# git and mercurial are needed most times for go get`, etc.
2123
# See https://github.com/docker-library/golang/issues/80

0 commit comments

Comments
 (0)