Skip to content

Commit 6020162

Browse files
committed
Releasing docker image for arm64: Incorporate review comment
Signed-off-by: odidev <[email protected]>
1 parent 0782072 commit 6020162

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.github/workflows/tag.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ jobs:
1717
go-version: 1.15
1818
- name: Unshallow
1919
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 }}
2029
- name: Prepare
2130
id: prepare
2231
run: |
@@ -28,15 +37,6 @@ jobs:
2837
uses: docker/setup-qemu-action@v1
2938
- name: Set up Docker Buildx
3039
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 }}
4040
- name: build and publish main image
4141
id: docker_build
4242
uses: docker/build-push-action@v2

build/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ RUN go build -o /usr/bin/golangci-lint ./cmd/golangci-lint/main.go
88

99
# stage 2
1010
FROM golang:1.15
11+
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
1112
COPY --from=builder /usr/bin/golangci-lint /usr/bin/
1213
CMD ["golangci-lint"]

build/Dockerfile.alpine

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ RUN CGO_ENABLED=0 go build -o /usr/bin/golangci-lint ./cmd/golangci-lint/main.go
1313

1414
# stage 2
1515
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
1619
RUN apk --no-cache add gcc musl-dev git mercurial
20+
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
1721
COPY --from=builder /usr/bin/golangci-lint /usr/bin/
1822
CMD ["golangci-lint"]

0 commit comments

Comments
 (0)