From d32b4481dad337a9e22fe935a8623eb45f7a0d70 Mon Sep 17 00:00:00 2001 From: "CJACK." Date: Mon, 23 Feb 2026 00:49:09 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=8F=90=E5=8D=87=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AF=B9=20GHCR=20=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E6=B3=A2=E5=8A=A8=E7=9A=84=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-artifacts.yml | 32 ++++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 3e33aa1..3c6d6ed 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -85,12 +85,29 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Wait for GHCR endpoint + run: | + set -euo pipefail + for i in {1..6}; do + if curl -fsSIL --max-time 15 https://ghcr.io/v2/ >/dev/null; then + exit 0 + fi + sleep "$((i * 10))" + done + echo "GHCR endpoint is unreachable after multiple retries." >&2 + exit 1 + + - name: Log in to GHCR (with retry) + run: | + set -euo pipefail + for i in {1..6}; do + if echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin; then + exit 0 + fi + sleep "$((i * 10))" + done + echo "Failed to login to GHCR after multiple retries." >&2 + exit 1 - name: Extract Docker metadata id: meta_release @@ -104,6 +121,9 @@ jobs: - name: Build and Push Docker Image uses: docker/build-push-action@v6 + env: + DOCKER_BUILD_RECORD_UPLOAD: "false" + DOCKER_BUILD_SUMMARY: "false" with: context: . file: ./Dockerfile