diff --git a/.github/workflows/push-builder.yml b/.github/workflows/push-builder.yml index 5f702042e..ef257ae8c 100644 --- a/.github/workflows/push-builder.yml +++ b/.github/workflows/push-builder.yml @@ -17,7 +17,9 @@ jobs: - name: Build run: make build-image + # Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures. - name: Publish container image + if: github.repository == 'vmware-tanzu/velero' run: | docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 51cd16258..2e0f1ac4f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -35,7 +35,9 @@ jobs: - name: Test run: make test + # Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures. - name: Publish container image + if: github.repository == 'vmware-tanzu/velero' run: | docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} ./hack/docker-push.sh