From fcd99ed9b56ba6f1903f63f459797910b6cd5bb7 Mon Sep 17 00:00:00 2001 From: Tasuku Yamashita Date: Wed, 20 May 2026 09:02:28 +0900 Subject: [PATCH] ci: skip Docker Hub login on PRs from forks GitHub Actions does not expose secrets to workflows triggered by PRs from forked repositories, so docker/login-action fails with "Username and password required" (e.g. PR #4292). Skip the login step when the PR head repo is not this repository; anonymous pulls still work, and push/manifest jobs are unaffected because they only run on master. --- .github/workflows/integration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 05b6d3a80..a24f5119a 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -32,6 +32,8 @@ jobs: with: fetch-depth: 0 - name: Login to Docker Hub + # Skip on PRs from forks (secrets are not available). + if: github.event.pull_request.head.repo.full_name == github.repository uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 with: username: ${{ secrets.CW_DOCKER_HUB_USERNAME }}