修复github action构建arm镜像失败的问题

This commit is contained in:
Liujian
2025-06-26 21:55:11 +08:00
parent ebccb151fc
commit b1f5b73e23
2 changed files with 7 additions and 3 deletions

View File

@@ -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:

View File

@@ -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