fix(ci): Add Docker login step for Harbor authentication

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-23 18:53:23 +08:00
parent 2aef693c0d
commit 3e730f16d4

View File

@@ -85,13 +85,10 @@ jobs:
echo "web_image=${{ env.REGISTRY }}/${{ env.HARBOR_PROJECT }}/web:${TAG}" >> $GITHUB_OUTPUT
echo "📦 Image Tag: ${TAG}"
- name: Verify Docker Auth
- name: Login to Harbor Registry
run: |
if docker pull ${{ env.REGISTRY }}/library/hello-world:latest 2>/dev/null || true; then
echo "✅ Harbor 認證有效"
else
echo "⚠️ Harbor 認證可能需要更新"
fi
echo "${{ secrets.HARBOR_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u ${{ secrets.HARBOR_USER }} --password-stdin
echo "✅ Harbor 登入成功"
# ----- Build API Image -----
# Phase 6.4i: 必須從 monorepo 根目錄建構 (context: .)