From 1389e693fd62c4790e400f346277dc971f41c283 Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Thu, 8 Feb 2024 15:50:49 +0530 Subject: [PATCH] :bookmark: Updated build --- .github/workflows/build-container.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-container.yaml b/.github/workflows/build-container.yaml index 970329047..c24b2ccfc 100644 --- a/.github/workflows/build-container.yaml +++ b/.github/workflows/build-container.yaml @@ -75,8 +75,8 @@ jobs: echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV echo "OVERRIDE_PUSHED_IMAGE=false" >> $GITHUB_ENV - - name: Build & Push Image - if: startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/') + - name: Build + if: "!startsWith(github.ref, 'refs/heads/release-') && !startsWith(github.ref, 'refs/tags/')" run: | set +e image_name="ghcr.io/${{ github.repository }}/${{matrix.app}}" @@ -90,10 +90,10 @@ jobs: set -e - docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG" --push + docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG" - name: Build & Push Image - if: !(startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/')) + if: startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/') run: | set +e image_name="ghcr.io/${{ github.repository }}/${{matrix.app}}" @@ -107,4 +107,5 @@ jobs: set -e - docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG" + docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG" --push +