Skip to content

Commit

Permalink
ci: don't push image to registry on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktm committed Jan 20, 2024
1 parent 20ef2f4 commit c6879d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ jobs:
run: docker build . -f Dockerfile --tag image

- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image
if: github.event_name != 'pull_request'
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME
Expand Down

0 comments on commit c6879d8

Please sign in to comment.