Skip to content

Commit cc40755

Browse files
glen-84michaelstaib
authored andcommitted
Updated CI workflow to only run Docker Hub login step for local branches (#8121)
1 parent 299929f commit cc40755

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ jobs:
186186
timeout-minutes: 5
187187

188188
- name: Log in to Docker Hub
189+
# Run step only if branch is local (not from a fork).
190+
if: >
191+
github.event_name != 'pull_request' ||
192+
(github.event_name == 'pull_request' &&
193+
github.event.pull_request.head.repo.full_name == github.repository)
189194
uses: docker/login-action@v3
190195
with:
191196
username: ${{ vars.DOCKERHUB_USERNAME }}

0 commit comments

Comments
 (0)