Skip to content

Commit bc1dc7e

Browse files
author
Oleksandr Dzhychko
committed
ci: only attempt to log in into Docker when attempting to push to docker
The values of environment variables are treated as strings. Therefore, we need to do a string comparison.
1 parent e6171fd commit bc1dc7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
# Try to log in early. If this fails, there's no reason to perform the remaining steps
102102
- name: Log in to Docker Hub
103103
# Only attempt to log in if we later attempt to push.
104-
if: ${{ env.PUSH }}
104+
if: ${{ env.PUSH == 'true' }}
105105
uses: docker/login-action@v3
106106
with:
107107
username: ${{ secrets.DOCKER_HUB_USER }}

0 commit comments

Comments
 (0)