@@ -18,23 +18,28 @@ jobs:
1818
1919 steps :
2020 - name : Checkout repository
21- uses : actions/checkout@v2
21+ uses : actions/checkout@v5
2222
2323 - name : Set up Docker Buildx
24- uses : docker/setup-buildx-action@v1
24+ uses : docker/setup-buildx-action@v3
2525
2626 - name : Get current date
2727 id : date
2828 run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
2929
3030 - name : Log in to Azure Container Registry
31- if : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
31+ if : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
3232 uses : azure/docker-login@v2
3333 with :
3434 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 : |
4954 BASE_TAG="demo"
5055 elif [[ "$BRANCH" == "hotfix" ]]; then
5156 BASE_TAG="hotfix"
57+ elif [[ "$BRANCH" == "dependabotchanges" ]]; then
58+ BASE_TAG="dependabotchanges"
59+
5260 else
5361 BASE_TAG="pullrequest-ignore"
5462 fi
@@ -62,27 +70,27 @@ jobs:
6270 with :
6371 context : ./src/ContentProcessor
6472 file : ./src/ContentProcessor/Dockerfile
65- push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
73+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
6674 tags : |
67- ${{ env.ACR_LOGIN_SERVER }}/contentprocessor:${{ env.BASE_TAG }}
68- ${{ env.ACR_LOGIN_SERVER }}/contentprocessor:${{ env.DATE_TAG }}
75+ ${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.BASE_TAG }}
76+ ${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.DATE_TAG }}
6977
7078 - name : Build and Push ContentProcessorAPI Docker image
7179 uses : docker/build-push-action@v6
7280 with :
7381 context : ./src/ContentProcessorAPI
7482 file : ./src/ContentProcessorAPI/Dockerfile
75- push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
83+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
7684 tags : |
77- ${{ env.ACR_LOGIN_SERVER }}/contentprocessorapi:${{ env.BASE_TAG }}
78- ${{ env.ACR_LOGIN_SERVER }}/contentprocessorapi:${{ env.DATE_TAG }}
85+ ${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.BASE_TAG }}
86+ ${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.DATE_TAG }}
7987
8088 - name : Build and Push ContentProcessorWeb Docker image
8189 uses : docker/build-push-action@v6
8290 with :
8391 context : ./src/ContentProcessorWeb
8492 file : ./src/ContentProcessorWeb/Dockerfile
85- push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
93+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
8694 tags : |
87- ${{ env.ACR_LOGIN_SERVER }}/contentprocessorweb:${{ env.BASE_TAG }}
88- ${{ env.ACR_LOGIN_SERVER }}/contentprocessorweb:${{ env.DATE_TAG }}
95+ ${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.BASE_TAG }}
96+ ${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.DATE_TAG }}
0 commit comments