Skip to content

Commit

Permalink
project: do not log into Docker in check runs started in forks (anoth…
Browse files Browse the repository at this point in the history
…er attempt)

Checking github.repository_owner is not enough. IIUC, it always points
at the repository in the context of which the current GHA check is
running.

Let's try `github.event.pull_request.head.repo.full_name` instead.
  • Loading branch information
ibodrov committed Feb 9, 2025
1 parent 445168c commit 972d7e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Login to DockerHub
uses: docker/login-action@v3
if: github.repository_owner == 'walmartlabs'
if: github.event.pull_request.head.repo.full_name == 'walmartlabs/concord'
with:
username: ${{ secrets.OSS_DOCKERHUB_USERNAME }}
password: ${{ secrets.OSS_DOCKERHUB_PASSWORD }}
Expand Down

0 comments on commit 972d7e2

Please sign in to comment.