From 84a33b50f278ab15a849a84b49a0ad23a61b5acd Mon Sep 17 00:00:00 2001 From: Ajit Padhi Date: Mon, 25 Nov 2024 20:48:37 +0530 Subject: [PATCH] updated workflow --- .github/workflows/build-docker-images.yml | 5 ----- .github/workflows/build-docker.yml | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 585ccf45b..16d3346a2 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -1,11 +1,6 @@ name: Build Docker Images on: - push: - branches: - - main - - dev - - demo workflow_run: workflows: [Tests] types: [completed] diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 18eff83f1..0d14652e9 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v4 - name: Docker Login - if: ${{ inputs.push == true && contains(github.ref, 'refs/heads/main') }} + if: ${{ inputs.push == true && github.ref_name == 'main' }} uses: docker/login-action@v3 with: registry: ${{ inputs.registry }} @@ -41,7 +41,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Dev Docker Login - if: ${{ inputs.push == true && (contains(github.ref, 'refs/heads/dev') || contains(github.ref, 'refs/heads/demo')) }} + if: ${{ inputs.push == true && (github.ref_name == 'dev' || github.ref_name == 'demo') }} uses: docker/login-action@v3 with: registry: ${{ inputs.registry }}