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