From 3f9ba9e8103baede5a46f9389c570386a777512e Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Thu, 7 Dec 2023 13:38:36 +0530 Subject: [PATCH] fix: set publish image job for main repo only Signed-off-by: K.B.Dharun Krishna --- .github/workflows/image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index c10ce5f..64588b7 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -18,6 +18,7 @@ jobs: run: docker image build -f Containerfile --tag ghcr.io/vanilla-os/differ:main . - name: Publish image + if: github.repository == 'vanilla-os/differ' && github.ref == 'refs/heads/main' run: | docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }} docker image push "ghcr.io/vanilla-os/differ:main"