Skip to content

Commit c2e0286

Browse files
Merge pull request #139 from microsoft/fix/tag-not-found
fix: pipeline login server tag not found
2 parents d62a182 + 6a3050d commit c2e0286

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ jobs:
3131
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
3232
uses: azure/docker-login@v2
3333
with:
34-
login-server: ${{ env.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}
34+
login-server: ${{ env.ACR_LOGIN_SERVER }}
3535
username: ${{ env.ACR_USERNAME }}
3636
password: ${{ env.ACR_PASSWORD }}
37-
37+
38+
- name: Get registry
39+
id: registry
40+
run: |
41+
echo "ext_registry=${{ env.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT
42+
3843
- name: Set Docker image tags
3944
id: tag
4045
run: |
@@ -64,8 +69,8 @@ jobs:
6469
file: ./src/ContentProcessor/Dockerfile
6570
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
6671
tags: |
67-
${{ env.ACR_LOGIN_SERVER }}/contentprocessor:${{ env.BASE_TAG }}
68-
${{ env.ACR_LOGIN_SERVER }}/contentprocessor:${{ env.DATE_TAG }}
72+
${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.BASE_TAG }}
73+
${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.DATE_TAG }}
6974
7075
- name: Build and Push ContentProcessorAPI Docker image
7176
uses: docker/build-push-action@v6
@@ -74,8 +79,8 @@ jobs:
7479
file: ./src/ContentProcessorAPI/Dockerfile
7580
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
7681
tags: |
77-
${{ env.ACR_LOGIN_SERVER }}/contentprocessorapi:${{ env.BASE_TAG }}
78-
${{ env.ACR_LOGIN_SERVER }}/contentprocessorapi:${{ env.DATE_TAG }}
82+
${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.BASE_TAG }}
83+
${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.DATE_TAG }}
7984
8085
- name: Build and Push ContentProcessorWeb Docker image
8186
uses: docker/build-push-action@v6
@@ -84,5 +89,5 @@ jobs:
8489
file: ./src/ContentProcessorWeb/Dockerfile
8590
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
8691
tags: |
87-
${{ env.ACR_LOGIN_SERVER }}/contentprocessorweb:${{ env.BASE_TAG }}
88-
${{ env.ACR_LOGIN_SERVER }}/contentprocessorweb:${{ env.DATE_TAG }}
92+
${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.BASE_TAG }}
93+
${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.DATE_TAG }}

0 commit comments

Comments
 (0)