Skip to content

Commit

Permalink
Don't push to the container registry for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
timschumi committed Sep 12, 2023
1 parent 275c844 commit 567d9d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -37,7 +38,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
push: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
pull: true
tags: |
ghcr.io/${{ github.repository }}:latest
Expand Down

0 comments on commit 567d9d9

Please sign in to comment.