Skip to content

Commit

Permalink
Pushing to the GitHub Container Registry only on 'push' not on 'pr'
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfuhrmann committed Jul 25, 2024
1 parent 372bfc7 commit 077150a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,9 @@ jobs:
tags: type=sha,format=long,prefix= # adds :<sha> tag to outputs.tags

- name: Build and push
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push: true
tags: ${{ steps.meta.outputs.tags }}

- name: Build and push
if: github.ref != 'refs/heads/master'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push: false
push: ${{github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 077150a

Please sign in to comment.