Skip to content

Commit

Permalink
ci(github): Do not push Docker images for pull requests
Browse files Browse the repository at this point in the history
Disable pushing of Docker images for the `docker-build` workflow if it
was triggered by a pull request. For pull requests the workflow should
only verify that the Docker build works, but not publish any images.

Signed-off-by: Martin Nonnenmacher <[email protected]>
  • Loading branch information
mnonnenmacher authored and sschuberth committed Apr 28, 2024
1 parent 50a2428 commit d3ddb4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-ort.outputs.tags }}
labels: ${{ steps.meta-ort.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/ort:cache
Expand All @@ -80,7 +80,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-ort-minimal.outputs.tags }}
labels: ${{ steps.meta-ort-minimal.outputs.labels }}
target: minimal
Expand Down

0 comments on commit d3ddb4d

Please sign in to comment.