File tree 3 files changed +14
-9
lines changed
3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 17
17
go-version : 1.15
18
18
- name : Unshallow
19
19
run : git fetch --prune --unshallow
20
+ - name : Login do docker.io
21
+ run : docker login -u golangci -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }}
22
+ - name : Create release
23
+ uses : goreleaser/goreleaser-action@v2
24
+ with :
25
+ version : latest
26
+ args : release --rm-dist
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.GOLANGCI_LINT_TOKEN }}
20
29
- name : Prepare
21
30
id : prepare
22
31
run : |
28
37
uses : docker/setup-qemu-action@v1
29
38
- name : Set up Docker Buildx
30
39
uses : docker/setup-buildx-action@v1
31
- - name : Login do docker.io
32
- run : docker login -u golangci -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }}
33
- - name : Create release
34
- uses : goreleaser/goreleaser-action@v2
35
- with :
36
- version : latest
37
- args : release --rm-dist
38
- env :
39
- GITHUB_TOKEN : ${{ secrets.GOLANGCI_LINT_TOKEN }}
40
40
- name : build and publish main image
41
41
id : docker_build
42
42
uses : docker/build-push-action@v2
Original file line number Diff line number Diff line change @@ -8,5 +8,6 @@ RUN go build -o /usr/bin/golangci-lint ./cmd/golangci-lint/main.go
8
8
9
9
# stage 2
10
10
FROM golang:1.15
11
+ # don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
11
12
COPY --from=builder /usr/bin/golangci-lint /usr/bin/
12
13
CMD ["golangci-lint" ]
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ RUN CGO_ENABLED=0 go build -o /usr/bin/golangci-lint ./cmd/golangci-lint/main.go
13
13
14
14
# stage 2
15
15
FROM golang:1.15-alpine
16
+ # gcc is required to support cgo;
17
+ # git and mercurial are needed most times for go get`, etc.
18
+ # See https://github.com/docker-library/golang/issues/80
16
19
RUN apk --no-cache add gcc musl-dev git mercurial
20
+ # don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
17
21
COPY --from=builder /usr/bin/golangci-lint /usr/bin/
18
22
CMD ["golangci-lint"]
You can’t perform that action at this time.
0 commit comments