From b1f5b73e2333de548b1be78bcf02a541e6d22fa0 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Thu, 26 Jun 2025 21:55:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgithub=20action=E6=9E=84?= =?UTF-8?q?=E5=BB=BAarm=E9=95=9C=E5=83=8F=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/actions.yaml | 7 +++++-- build/cmd/docker_build.sh | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index a21df7e5..63579c41 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -43,12 +43,15 @@ jobs: uses: actions/setup-go@v3 with: go-version: '1.23.6' + - uses: actions/checkout@v3 - - name: SetOutput - run: echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT - name: GoTidy run: | go mod tidy + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login Docker #登录docker uses: docker/login-action@v1 with: diff --git a/build/cmd/docker_build.sh b/build/cmd/docker_build.sh index 14ca1e11..2e788f41 100755 --- a/build/cmd/docker_build.sh +++ b/build/cmd/docker_build.sh @@ -22,10 +22,11 @@ fi SYS_ARCH=$(arch) if [[ (${SYS_ARCH} == "aarch64" || $(arch) == "arm64") && $ARCH == "amd64" ]];then OPTIONS="--platform=linux/amd64" -elif [[ $(arch) == "amd64" && $ARCH == "arm64" ]];then +elif [[ (${SYS_ARCH} == "amd64" || ${SYS_ARCH} == "x86_64") && $ARCH == "arm64" ]];then OPTIONS="--platform=linux/arm64" fi + ./build/cmd/package.sh ${VERSION} ${ARCH} PackageName=apinto_${VERSION}_linux_${ARCH}.tar.gz cp out/${PackageName} ./build/resources/apinto.linux.x64.tar.gz