File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X
1313FROM golang:1.21
1414# related to https://github.com/golangci/golangci-lint/issues/3107
1515ENV GOROOT /usr/local/go
16+ # Set all directories as safe
17+ RUN git config --global --add safe.directory '*'
1618# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
1719COPY --from=builder /golangci/golangci-lint /usr/bin/
1820CMD ["golangci-lint" ]
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ ENV GOROOT /usr/local/go
2222# git and mercurial are needed most times for go get`, etc.
2323# See https://github.com/docker-library/golang/issues/80
2424RUN apk --no-cache add gcc musl-dev git mercurial
25+ # Set all directories as safe
26+ RUN git config --global --add safe.directory '*'
2527# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
2628COPY --from=builder /golangci/golangci-lint /usr/bin/
2729CMD ["golangci-lint" ]
You can’t perform that action at this time.
0 commit comments