File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -52,21 +52,26 @@ jobs:
5252 else
5353 echo "TAG=pullrequest-ignore" >> $GITHUB_ENV
5454 fi
55+
56+ - name : Get registry
57+ id : registry
58+ run : |
59+ echo "ext_registry=${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT
5560
5661 - name : Build and push Docker images optionally
5762 run : |
5863 cd src/backend
59- docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/macaebackend:${{ env.TAG }} -f Dockerfile . && \
64+ docker build -t ${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }} -f Dockerfile . && \
6065 if [[ "${{ env.TAG }}" == "latest" || "${{ env.TAG }}" == "dev" || "${{ env.TAG }}" == "demo" || "${{ env.TAG }}" == "hotfix" ]]; then
61- docker push ${{ secrets.ACR_LOGIN_SERVER }}/macaebackend:${{ env.TAG }} && \
66+ docker push ${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }} && \
6267 echo "Backend image built and pushed successfully."
6368 else
6469 echo "Skipping Docker push for backend with tag: ${{ env.TAG }}"
6570 fi
6671 cd ../frontend
67- docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/macaefrontend:${{ env.TAG }} -f Dockerfile . && \
72+ docker build -t ${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }} -f Dockerfile . && \
6873 if [[ "${{ env.TAG }}" == "latest" || "${{ env.TAG }}" == "dev" || "${{ env.TAG }}" == "demo" || "${{ env.TAG }}" == "hotfix" ]]; then
69- docker push ${{ secrets.ACR_LOGIN_SERVER }}/macaefrontend:${{ env.TAG }} && \
74+ docker push ${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }} && \
7075 echo "Frontend image built and pushed successfully."
7176 else
7277 echo "Skipping Docker push for frontend with tag: ${{ env.TAG }}"
You can’t perform that action at this time.
0 commit comments