From aabbf2abac15d9b902c22a87dd6ff365df2ef9fd Mon Sep 17 00:00:00 2001 From: Antigravity Date: Thu, 22 Oct 2026 14:23:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E6=9B=B4=E6=96=B0=20Gitea=20Runner?= =?UTF-8?q?=20=E4=B8=8E=E9=95=9C=E5=83=8F=E6=A0=87=E7=AD=BE=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将多架构构建切换到 amd64 和 arm64 Runner, 并明确 master、main 分支及版本标签的 latest 镜像规则。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitea/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f96ac8b..6b40eea 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -20,10 +20,10 @@ jobs: matrix: include: - platform: linux/amd64 - runner: ubuntu-latest + runner: amd64 # 香港 runner,原生编译 arch: amd64 - platform: linux/arm64 - runner: [self-hosted, linux, ARM64] + runner: arm64 # 本机 runner,原生编译 arch: arm64 runs-on: ${{ matrix.runner }} @@ -52,7 +52,7 @@ jobs: type=ref,event=branch type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest,enable=${{ gitea.ref == format('refs/heads/{0}', gitea.event.repository.default_branch) || startsWith(gitea.ref, 'refs/tags/v') }} + type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/master' || gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/v') }} - name: Build and push by architecture uses: docker/build-push-action@v5 @@ -66,7 +66,7 @@ jobs: merge-manifests: needs: build-arch - runs-on: ubuntu-latest + runs-on: amd64 steps: - name: Log in to Gitea Container Registry uses: docker/login-action@v3 @@ -84,7 +84,7 @@ jobs: type=ref,event=branch type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest,enable=${{ gitea.ref == format('refs/heads/{0}', gitea.event.repository.default_branch) || startsWith(gitea.ref, 'refs/tags/v') }} + type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/master' || gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/v') }} - name: Create and push multi-arch manifest env: @@ -96,4 +96,4 @@ jobs: "${tag}-amd64" \ "${tag}-arm64" docker buildx imagetools inspect "$tag" - done + done \ No newline at end of file