Merge branch 'hotfix/0.5.2' #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Docker | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest] | |
go-version: ["1.22"] | |
name: Release | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: 检出分支 | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt install musl-tools | |
sudo apt install wget | |
- name: Arm dependencies | |
run: | | |
wget -P ~ https://musl.cc/aarch64-linux-musl-cross.tgz | |
tar -xvf ~/aarch64-linux-musl-cross.tgz -C ~ | |
- name: Build | |
run: | | |
bash build.sh docker | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tags: "${{ secrets.DOCKER_REPOSITORY }}:${{ steps.get_version.outputs.VERSION }},${{ secrets.DOCKER_REPOSITORY }}:latest" |