Skip to content

Commit

Permalink
fix: only login to DockerHub on changes to main
Browse files Browse the repository at this point in the history
  • Loading branch information
m-adawi committed Sep 30, 2024
1 parent b93d523 commit bbfe8f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/docker-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:

- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.ref_name == 'main' }}
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -68,4 +69,4 @@ jobs:
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ vars.DOCKERHUB_USERNAME }}/swarm-cd
repository: ${{ vars.DOCKERHUB_USERNAME }}/swarm-cd

0 comments on commit bbfe8f8

Please sign in to comment.