Skip to content

Commit 5b64864

Browse files
author
Joris Berthelot
committed
build: fix CI and build arm64 arch
1 parent 9494596 commit 5b64864

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,12 @@ jobs:
5151
with:
5252
username: ${{ secrets.DOCKERHUB_USERNAME }}
5353
password: ${{ secrets.DOCKERHUB_TOKEN }}
54-
- name: Retrieve tag
55-
id: tagref
56-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
5754
- name: Build and push
5855
uses: docker/build-push-action@v4
5956
with:
60-
platforms: linux/amd64
61-
build-args: version=${{ steps.tagref.outputs.tag }}+${{ github.sha }}
62-
tags: '${{ github.repository }}:${{ steps.tagref.outputs.tag }},${{ github.repository }}:latest'
57+
platforms: linux/amd64,linux/arm64
58+
build-args: version=${{ github.ref_name }}+${{ github.sha }}
59+
tags: '${{ github.repository }}:${{ github.ref_name }},${{ github.repository }}:latest'
6360
push: true
6461
- name: Update repo description
6562
uses: peter-evans/dockerhub-description@v3
@@ -77,20 +74,18 @@ jobs:
7774
strategy:
7875
matrix:
7976
target: [http2smtp, http2smtp-lambda]
77+
goarch: [amd64, arm64]
8078
steps:
8179
- uses: actions/checkout@v3
82-
- name: Retrieve tag
83-
id: tagref
84-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
8580
- uses: wangyoucao577/go-release-action@v1
8681
with:
87-
github_token: ${{ secrets.GH_TOKEN }}
82+
github_token: ${{ secrets.GITHUB_TOKEN }}
8883
goos: linux
89-
goarch: amd64
84+
goarch: ${{ matrix.goarch }}
9085
goversion: '1.20'
9186
project_path: cmd/${{ matrix.target }}
9287
binary_name: ${{ matrix.target }}
9388
extra_files: LICENSE README.md
94-
release_tag: ${{ steps.tagref.outputs.tag }}
95-
ldflags: -X github.com/eexit/http2smtp/internal/api.Version=${{ steps.tagref.outputs.tag }}+${{ github.sha }}
89+
release_tag: ${{ github.ref_name }}
90+
ldflags: -X github.com/eexit/http2smtp/internal/api.Version=${{ github.ref_name }}+${{ github.sha }}
9691
executable_compression: upx

0 commit comments

Comments
 (0)