@@ -17,12 +17,47 @@ jobs:
17
17
go-version : 1.15
18
18
- name : Unshallow
19
19
run : git fetch --prune --unshallow
20
+ - name : Prepare
21
+ id : prepare
22
+ run : |
23
+ TAG=${GITHUB_REF#refs/tags/}
24
+ MAJOR=${TAG%.*}
25
+ echo ::set-output name=tag_name::${TAG}
26
+ echo ::set-output name=major_tag::${MAJOR}
27
+ - name : Set up QEMU
28
+ uses : docker/setup-qemu-action@v1
29
+ - name : Set up Docker Buildx
30
+ uses : docker/setup-buildx-action@v1
20
31
- name : Login do docker.io
21
- run : docker login -u golangci -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }}
32
+ run : docker login -u odidev -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }}
22
33
- name : Create release
23
34
uses : goreleaser/goreleaser-action@v2
24
35
with :
25
36
version : latest
26
37
args : release --rm-dist
27
38
env :
28
39
GITHUB_TOKEN : ${{ secrets.GOLANGCI_LINT_TOKEN }}
40
+ - name : build and publish main image
41
+ id : docker_build
42
+ uses : docker/build-push-action@v2
43
+ with :
44
+ context : .
45
+ file : build/Dockerfile
46
+ platforms : linux/amd64,linux/arm64
47
+ push : true
48
+ tags : |
49
+ odidev/golangci-lint:${{ steps.prepare.outputs.tag_name }}
50
+ odidev/golangci-lint:${{ steps.prepare.outputs.major_tag }}
51
+ odidev/golangci-lint:latest
52
+ - name : build and publish alpine image
53
+ id : docker_build_alpine
54
+ uses : docker/build-push-action@v2
55
+ with :
56
+ context : .
57
+ file : build/Dockerfile.alpine
58
+ platforms : linux/amd64,linux/arm64
59
+ push : true
60
+ tags : |
61
+ odidev/golangci-lint:${{ steps.prepare.outputs.tag_name }}-alpine
62
+ odidev/golangci-lint:${{ steps.prepare.outputs.major_tag }}-alpine
63
+ odidev/golangci-lint:latest-alpine
0 commit comments