From e69b2c5225030af0b350c9eb6aa1ee0dd12451cb Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 25 Jan 2026 19:34:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20timeout=20=E9=99=90?= =?UTF-8?q?=E5=88=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=B8=8A=E5=82=B3=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=A8=8A=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 244de2a..7d54aff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,6 @@ jobs: # ============================================================================== build-amd64: runs-on: ubuntu-24.04 - timeout-minutes: 120 permissions: contents: read packages: write @@ -117,28 +116,36 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push AMD64 image + - name: "🐳 Build and push AMD64 image" uses: docker/build-push-action@v6 - timeout-minutes: 90 with: context: . file: Dockerfile push: true tags: ${{ env.DOCKER_IMAGE }}:${{ steps.tag.outputs.version }}-amd64 platforms: linux/amd64 + # 只使用 cache-from,不使用 cache-to(避免額外上傳時間) cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache-amd64 - cache-to: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache-amd64,mode=max,compression=zstd provenance: false sbom: false build-args: | BUILDKIT_INLINE_CACHE=1 + - name: "✅ AMD64 Image 構建完成" + run: | + echo "========================================" + echo "🚀 AMD64 Image 已成功推送到 Docker Hub" + echo "========================================" + echo "Image: ${{ env.DOCKER_IMAGE }}:${{ steps.tag.outputs.version }}-amd64" + echo "Platform: linux/amd64" + echo "Time: $(date)" + echo "========================================" + # ============================================================================== # 🐳 Build ARM64 Image(分開構建解決空間不足問題) # ============================================================================== build-arm64: runs-on: ubuntu-24.04 - timeout-minutes: 180 permissions: contents: read packages: write @@ -235,22 +242,31 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push ARM64 image + - name: "🐳 Build and push ARM64 image" uses: docker/build-push-action@v6 - timeout-minutes: 150 with: context: . file: Dockerfile push: true tags: ${{ env.DOCKER_IMAGE }}:${{ steps.tag.outputs.version }}-arm64 platforms: linux/arm64 + # 只使用 cache-from,不使用 cache-to(避免額外上傳時間) cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache-arm64 - cache-to: type=registry,ref=${{ env.DOCKER_IMAGE }}:buildcache-arm64,mode=max,compression=zstd provenance: false sbom: false build-args: | BUILDKIT_INLINE_CACHE=1 + - name: "✅ ARM64 Image 構建完成" + run: | + echo "========================================" + echo "🚀 ARM64 Image 已成功推送到 Docker Hub" + echo "========================================" + echo "Image: ${{ env.DOCKER_IMAGE }}:${{ steps.tag.outputs.version }}-arm64" + echo "Platform: linux/arm64" + echo "Time: $(date)" + echo "========================================" + # ============================================================================== # 🐳 Create Multi-Arch Manifest(合併兩個架構) # ==============================================================================