From 08dd97106a405e7f02cdcb3bfe17492684becd0e Mon Sep 17 00:00:00 2001 From: Priyanka-Microsoft Date: Thu, 22 May 2025 14:58:43 +0530 Subject: [PATCH 1/2] tag error not found --- .github/workflows/build-docker-image.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 12a4c192..83cda16c 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -31,10 +31,15 @@ jobs: if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }} uses: azure/docker-login@v2 with: - login-server: ${{ env.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }} + login-server: ${{ env.ACR_LOGIN_SERVER }} username: ${{ env.ACR_USERNAME }} password: ${{ env.ACR_PASSWORD }} - + + - name: Get registry + id: registry + run: | + echo "ext_registry=${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT + - name: Set Docker image tags id: tag run: | @@ -64,8 +69,8 @@ jobs: file: ./src/ContentProcessor/Dockerfile push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }} tags: | - ${{ env.ACR_LOGIN_SERVER }}/contentprocessor:${{ env.BASE_TAG }} - ${{ env.ACR_LOGIN_SERVER }}/contentprocessor:${{ env.DATE_TAG }} + ${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.BASE_TAG }} + ${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.DATE_TAG }} - name: Build and Push ContentProcessorAPI Docker image uses: docker/build-push-action@v6 @@ -74,8 +79,8 @@ jobs: file: ./src/ContentProcessorAPI/Dockerfile push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }} tags: | - ${{ env.ACR_LOGIN_SERVER }}/contentprocessorapi:${{ env.BASE_TAG }} - ${{ env.ACR_LOGIN_SERVER }}/contentprocessorapi:${{ env.DATE_TAG }} + ${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.BASE_TAG }} + ${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.DATE_TAG }} - name: Build and Push ContentProcessorWeb Docker image uses: docker/build-push-action@v6 @@ -84,5 +89,5 @@ jobs: file: ./src/ContentProcessorWeb/Dockerfile push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }} tags: | - ${{ env.ACR_LOGIN_SERVER }}/contentprocessorweb:${{ env.BASE_TAG }} - ${{ env.ACR_LOGIN_SERVER }}/contentprocessorweb:${{ env.DATE_TAG }} + ${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.BASE_TAG }} + ${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.DATE_TAG }} From 6a3050dfeaec28b96098f3f7d53a828aad72083c Mon Sep 17 00:00:00 2001 From: Priyanka-Microsoft Date: Thu, 22 May 2025 15:34:37 +0530 Subject: [PATCH 2/2] replace secret from env --- .github/workflows/build-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 83cda16c..8bc8d3c9 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -38,7 +38,7 @@ jobs: - name: Get registry id: registry run: | - echo "ext_registry=${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT + echo "ext_registry=${{ env.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT - name: Set Docker image tags id: tag