diff --git a/.github/workflows/docker-build/action.yaml b/.github/workflows/docker-build/action.yaml index 2d65e5f..7d8adb4 100644 --- a/.github/workflows/docker-build/action.yaml +++ b/.github/workflows/docker-build/action.yaml @@ -25,6 +25,7 @@ runs: uses: docker/setup-buildx-action@v3 - name: "Login to GitHub Container Registry" + if: ${{ github.ref == 'refs/heads/main' }} uses: docker/login-action@v3 with: registry: ghcr.io @@ -35,7 +36,7 @@ runs: uses: docker/build-push-action@v5 with: context: . - push: false + push: ${{ github.ref == 'refs/heads/main' }} file: ${{ inputs.DOCKERFILE }} platforms: linux/amd64,linux/arm64 tags: ghcr.io/leonitousconforti/tinyburg/${{ inputs.PROJECT }}:latest