Skip to content

Commit

Permalink
Only run Github package login on main
Browse files Browse the repository at this point in the history
  • Loading branch information
thekeenant authored Dec 2, 2023
1 parent 296b71e commit 321262b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
registry: ghcr.io
username: ${{ secrets.PUBLISHING_GITHUB_USERNAME }}
password: ${{ secrets.PUBLISHING_GITHUB_TOKEN }}
if: ${{ github.ref == 'refs/heads/main' }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: ./
tags: |
ghcr.io/madgrades/api.madgrades.com:latest
# push: true
push: ${{ github.ref == 'refs/heads/main' }}

0 comments on commit 321262b

Please sign in to comment.