Skip to content

Commit 9a8ad97

Browse files
committed
ci: don't login to the Docker hub for PRs
1 parent 663aff7 commit 9a8ad97

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
platforms: ${{ matrix.platform }}
135135
- name: Login to DockerHub
136136
uses: docker/login-action@v3
137+
if: github.event.pull_request.head.repo.full_name == github.repository
137138
with:
138139
username: ${{ secrets.REGISTRY_USERNAME }}
139140
password: ${{ secrets.REGISTRY_PASSWORD }}
@@ -222,6 +223,7 @@ jobs:
222223
uses: docker/setup-buildx-action@v3
223224
- name: Login to DockerHub
224225
uses: docker/login-action@v3
226+
if: github.event.pull_request.head.repo.full_name == github.repository
225227
with:
226228
username: ${{ secrets.REGISTRY_USERNAME }}
227229
password: ${{ secrets.REGISTRY_PASSWORD }}

.github/workflows/static.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
platforms: ${{ matrix.platform }}
102102
- name: Login to DockerHub
103103
uses: docker/login-action@v3
104+
if: github.event.pull_request.head.repo.full_name == github.repository
104105
with:
105106
username: ${{ secrets.REGISTRY_USERNAME }}
106107
password: ${{ secrets.REGISTRY_PASSWORD }}
@@ -204,6 +205,7 @@ jobs:
204205
platforms: ${{ matrix.platform }}
205206
- name: Login to DockerHub
206207
uses: docker/login-action@v3
208+
if: github.event.pull_request.head.repo.full_name == github.repository
207209
with:
208210
username: ${{ secrets.REGISTRY_USERNAME }}
209211
password: ${{ secrets.REGISTRY_PASSWORD }}
@@ -313,6 +315,7 @@ jobs:
313315
uses: docker/setup-buildx-action@v3
314316
- name: Login to DockerHub
315317
uses: docker/login-action@v3
318+
if: github.event.pull_request.head.repo.full_name == github.repository
316319
with:
317320
username: ${{ secrets.REGISTRY_USERNAME }}
318321
password: ${{ secrets.REGISTRY_PASSWORD }}

0 commit comments

Comments
 (0)