Skip to content

Commit e09ed52

Browse files
committed
Prevent Docker Hub login when secrets are not available
1 parent 4d87150 commit e09ed52

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ jobs:
1414

1515
- name: Log in to Docker Hub
1616
uses: docker/login-action@v2
17+
if: env.DOCKER_USERNAME
18+
env:
19+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
1720
with:
18-
username: ${{ secrets.DOCKER_USERNAME }}
21+
username: ${{ env.DOCKER_USERNAME }}
1922
password: ${{ secrets.DOCKER_PASSWORD }}
2023

2124
- name: Set up Docker Buildx

0 commit comments

Comments
 (0)