@@ -2,7 +2,7 @@ name: Build and Push Docker Images
22
33on :
44 push :
5- branches : [main, dev, demo, hotfix]
5+ branches : [main, dev, demo, hotfix, psl-docker-build-and-push-v2, psl-cps-v2 ]
66 paths :
77 - ' src/ContentProcessor/src/**'
88 - ' src/**/Dockerfile'
2121 - ' src/ContentProcessorWeb/env.sh'
2222 - ' .github/workflows/build-docker-image.yml'
2323 pull_request :
24- branches : [main, dev, demo, hotfix]
24+ branches : [main, dev, demo, hotfix, psl-docker-build-and-push-v2, psl-cps-v2 ]
2525 types : [opened, ready_for_review, reopened, synchronize]
2626 paths :
2727 - ' src/ContentProcessor/src/**'
@@ -69,15 +69,15 @@ jobs:
6969 run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
7070
7171 - name : Login to Azure
72- if : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
72+ if : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' || github.ref_name == 'psl-docker-build-and-push-v2' || github.ref_name == 'psl-cps-v2' }}
7373 uses : azure/login@v2
7474 with :
7575 client-id : ${{ secrets.AZURE_CLIENT_ID }}
7676 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
7777 subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
7878
7979 - name : Log in to Azure Container Registry
80- if : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
80+ if : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' || github.ref_name == 'psl-docker-build-and-push-v2' || github.ref_name == 'psl-cps-v2' }}
8181 run : az acr login --name ${{ env.ACR_LOGIN_SERVER }}
8282
8383 - name : Get registry
9292 DATE="${{ steps.date.outputs.date }}"
9393 GITHUB_RUN_NUMBER="${{ github.run_number }}"
9494 if [[ "$BRANCH" == "main" ]]; then
95- BASE_TAG="latest "
95+ BASE_TAG="latest_v2 "
9696 elif [[ "$BRANCH" == "dev" ]]; then
9797 BASE_TAG="dev"
9898 elif [[ "$BRANCH" == "demo" ]]; then
@@ -101,6 +101,10 @@ jobs:
101101 BASE_TAG="hotfix"
102102 elif [[ "$BRANCH" == "dependabotchanges" ]]; then
103103 BASE_TAG="dependabotchanges"
104+ elif [[ "$BRANCH" == "psl-docker-build-and-push-v2" ]]; then
105+ BASE_TAG="latest_v2"
106+ elif [[ "$BRANCH" == "psl-cps-v2" ]]; then
107+ BASE_TAG="latest_v2"
104108
105109 else
106110 BASE_TAG="pullrequest-ignore"
@@ -115,7 +119,7 @@ jobs:
115119 with :
116120 context : ./src/ContentProcessor
117121 file : ./src/ContentProcessor/Dockerfile
118- push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
122+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' || github.ref_name == 'psl-docker-build-and-push-v2' || github.ref_name == 'psl-cps-v2' }}
119123 tags : |
120124 ${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.BASE_TAG }}
121125 ${{ steps.registry.outputs.ext_registry }}/contentprocessor:${{ env.DATE_TAG }}
@@ -125,7 +129,7 @@ jobs:
125129 with :
126130 context : ./src/ContentProcessorAPI
127131 file : ./src/ContentProcessorAPI/Dockerfile
128- push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
132+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' || github.ref_name == 'psl-docker-build-and-push-v2' || github.ref_name == 'psl-cps-v2' }}
129133 tags : |
130134 ${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.BASE_TAG }}
131135 ${{ steps.registry.outputs.ext_registry }}/contentprocessorapi:${{ env.DATE_TAG }}
@@ -135,7 +139,17 @@ jobs:
135139 with :
136140 context : ./src/ContentProcessorWeb
137141 file : ./src/ContentProcessorWeb/Dockerfile
138- push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' }}
142+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' || github.ref_name == 'psl-docker-build-and-push-v2' || github.ref_name == 'psl-cps-v2' }}
139143 tags : |
140144 ${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.BASE_TAG }}
141145 ${{ steps.registry.outputs.ext_registry }}/contentprocessorweb:${{ env.DATE_TAG }}
146+
147+ - name : Build and Push ContentProcessorWorkflow Docker image
148+ uses : docker/build-push-action@v6
149+ with :
150+ context : ./src/ContentProcessorWorkflow
151+ file : ./src/ContentProcessorWorkflow/Dockerfile
152+ push : ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' || github.ref_name == 'dependabotchanges' || github.ref_name == 'psl-docker-build-and-push-v2' || github.ref_name == 'psl-cps-v2' }}
153+ tags : |
154+ ${{ steps.registry.outputs.ext_registry }}/contentprocessorworkflow:${{ env.BASE_TAG }}
155+ ${{ steps.registry.outputs.ext_registry }}/contentprocessorworkflow:${{ env.DATE_TAG }}
0 commit comments