From bc7bcc7d6ea300058100606a6888943b9f35733d Mon Sep 17 00:00:00 2001 From: Zecheng Date: Wed, 15 May 2024 13:14:02 -0500 Subject: [PATCH] ci: only push the image from main (#20) ## What does this PR do? only push the image from main --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4de5f9..fec30cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -59,6 +59,7 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Push image + if: github.ref == 'refs/heads/main' run: | IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')