Skip to content

Commit c747052

Browse files
Merge pull request #227 from microsoft/fix/pipeline-login-server-tag-not-found
fix: pipeline error for tag not found has been fixed
2 parents 2b88d08 + 556eedd commit c747052

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/docker-build-and-push.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
- name: Get current date
4343
id: date
4444
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
45+
46+
- name: Get registry
47+
id: registry
48+
run: |
49+
echo "ext_registry=${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT
4550
4651
- name: Determine Tag Name Based on Branch
4752
id: determine_tag
@@ -72,8 +77,8 @@ jobs:
7277
file: ./src/backend/Dockerfile
7378
push: ${{ env.TAG != 'pullrequest-ignore' }}
7479
tags: |
75-
${{ secrets.ACR_LOGIN_SERVER }}/macaebackend:${{ env.TAG }}
76-
${{ secrets.ACR_LOGIN_SERVER }}/macaebackend:${{ env.HISTORICAL_TAG }}
80+
${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }}
81+
${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.HISTORICAL_TAG }}
7782
7883
- name: Build and optionally push Frontend Docker image
7984
uses: docker/build-push-action@v6
@@ -82,5 +87,5 @@ jobs:
8287
file: ./src/frontend/Dockerfile
8388
push: ${{ env.TAG != 'pullrequest-ignore' }}
8489
tags: |
85-
${{ secrets.ACR_LOGIN_SERVER }}/macaefrontend:${{ env.TAG }}
86-
${{ secrets.ACR_LOGIN_SERVER }}/macaefrontend:${{ env.HISTORICAL_TAG }}
90+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }}
91+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.HISTORICAL_TAG }}

0 commit comments

Comments
 (0)