Skip to content

Commit 83084f2

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

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

.gitattributes

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

.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

build/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ 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+
ENV GOROOT /usr/local/go
1415
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
1516
COPY --from=builder /golangci/golangci-lint /usr/bin/
1617
CMD ["golangci-lint"]

build/Dockerfile.alpine renamed to build/alpine.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ 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+
ENV GOROOT /usr/local/go
1920
# gcc is required to support cgo;
2021
# git and mercurial are needed most times for go get`, etc.
2122
# See https://github.com/docker-library/golang/issues/80

0 commit comments

Comments
 (0)