File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 8383 ref : refs/tags/${{github.event.inputs.env}}
8484 - run : cd tasking-manager; echo TM_VERSION=`/usr/bin/git log -1 --format='%h'` >> "$GITHUB_ENV"
8585
86-
8786 # leaderboard submod
8887 - name : Checkout leaderboard
8988 uses : actions/checkout@v2
9392 ref : refs/tags/${{github.event.inputs.env}}
9493 - run : cd leaderboard; echo LB_VERSION=`/usr/bin/git log -1 --format='%h'` >> "$GITHUB_ENV"
9594
96-
9795 - uses : docker/login-action@v3
9896 with :
9997 registry : ${{ vars.WS_DOCKER_REGISTRY }}
@@ -115,9 +113,23 @@ jobs:
115113
116114 - name : Build and push
117115 run : |
118- docker compose -f docker-compose.build.yml --env-file tdei_uw.env build --build-arg CODE_VERSION=${CODE_VERSION} ${{github.event.inputs.build_flag}}
119- docker compose -f docker-compose.build.yml --env-file tdei_uw.env push
120-
116+ set -x
117+
118+ for IMAGE_PATH in `docker compose -f docker-compose.build.yml config --images`;
119+ do
120+ IMAGE_NAME=`echo ${IMAGE_PATH} | cut -d '/' -f 2`
121+ TAG="$CODE_VERSION"
122+
123+ if [ $(az acr repository show-tags --name opensidewalksdev --repository $image | grep -o $TAG) == "$TAG" ]; then
124+ echo "Image already exists for $IMAGE_PATH, not building again"
125+ else
126+ echo "Image does not exist at $IMAGE_PATH, building and pushing"
127+
128+ #docker compose -f docker-compose.build.yml --env-file tdei_uw.env build --build-arg CODE_VERSION=${CODE_VERSION} ${{github.event.inputs.build_flag}}
129+ #docker compose -f docker-compose.build.yml --env-file tdei_uw.env push
130+ fi
131+ done
132+
121133 env :
122134 ENV : ${{ vars.ENV }}
123135 CODE_VERSION : " ${{ env.FRONTEND_VERSION }}-${{ env.CGIMAP_VERSION }}-${{ env.OSMRAILS_VERSION }}-${{ env.PATHWAYS_VERSION }}-${{ env.RAPID_VERSION }}-${{ env.TM_VERSION }}-${{ env.LB_VERSION }}"
You can’t perform that action at this time.
0 commit comments