fix(ci): 更新 Gitea Runner 与镜像标签规则
Build and Push Multi-Arch Docker Image / build-arch (amd64, linux/amd64, amd64) (push) Failing after 3m41s
Build and Push Multi-Arch Docker Image / build-arch (arm64, linux/arm64, arm64) (push) Failing after 5m38s
Build and Push Multi-Arch Docker Image / merge-manifests (push) Skipped
Build and Push Multi-Arch Docker Image / build-arch (amd64, linux/amd64, amd64) (push) Failing after 3m41s
Build and Push Multi-Arch Docker Image / build-arch (arm64, linux/arm64, arm64) (push) Failing after 5m38s
Build and Push Multi-Arch Docker Image / merge-manifests (push) Skipped
将多架构构建切换到 amd64 和 arm64 Runner, 并明确 master、main 分支及版本标签的 latest 镜像规则。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
886b551d10
commit
aabbf2abac
1 file changed
+6
-6
@@ -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
|
||||
Reference in new issue
Block a user