diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 62fb10c..eecbd88 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -23,10 +23,18 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build and push + - name: Build + if: github.ref != 'refs/heads/main' uses: docker/build-push-action@v6 with: file: BeyondTrustConnector/Dockerfile push: true tags: frodehus/beyondtrustconnector:latest + - name: Build and push + if: github.ref == 'refs/heads/main' + uses: docker/build-push-action@v6 + with: + file: BeyondTrustConnector/Dockerfile + push: true + tags: frodehus/beyondtrustconnector:latest