Only attempt to login to Docker if the workflow event is a push

This commit is contained in:
Eric Allam
2023-11-24 14:16:41 +00:00
parent d56b2eded5
commit a2f5dc8bc6
+1
View File
@@ -7,6 +7,7 @@ jobs:
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: 🐳 Login to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}