mirror of
https://github.com/eolinker/apinto
synced 2025-09-26 21:01:19 +08:00
修复github action构建arm镜像失败的问题
This commit is contained in:
7
.github/workflows/actions.yaml
vendored
7
.github/workflows/actions.yaml
vendored
@@ -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:
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user