Skip to content

Commit d90acb9

Browse files
committed
fix(ci): skip Docker Hub login on pull_request events
Dependabot PRs cannot access repository secrets, causing the login step to fail with 'Username and password required'. Since the build-push step already skips push on PRs, the login is also unnecessary for PRs.
1 parent f395d30 commit d90acb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
type=raw,value=latest,enable={{is_default_branch}}
3737
3838
- name: Login to Docker Hub
39+
if: github.event_name != 'pull_request'
3940
uses: docker/login-action@v3
4041
with:
4142
username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -54,4 +55,3 @@ jobs:
5455
NODE_ENV=production
5556
cache-from: type=registry,ref=paueron/lynx:buildcache
5657
cache-to: type=inline
57-

0 commit comments

Comments
 (0)