File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -61,21 +61,31 @@ jobs:
6161 if : github.ref_name != github.event.repository.default_branch
6262 run : echo "IMAGE_TAG_SUFFIX=_$(echo '${{ github.ref_name }}' | tr / -)_ci" >> $GITHUB_ENV
6363
64- - uses : docker/login-action@v3
65- name : Login to Docker Hub
66- with :
67- username : ${{ secrets.DOCKER_USERNAME }}
68- password : ${{ secrets.DOCKER_PASSWORD }}
64+ - name : Check if monolith image exists locally
65+ id : check_monolith_image
66+ run : |
67+ if docker image inspect rwthika/carla-simulator:monolith${{ env.IMAGE_TAG_SUFFIX }} > /dev/null 2>&1; then
68+ echo "exists=true" >> $GITHUB_OUTPUT
69+ else
70+ echo "exists=false" >> $GITHUB_OUTPUT
71+ fi
72+
73+ # - uses: docker/login-action@v3
74+ # name: Login to Docker Hub
75+ # with:
76+ # username: ${{ secrets.DOCKER_USERNAME }}
77+ # password: ${{ secrets.DOCKER_PASSWORD }}
6978
7079 - uses : docker/build-push-action@v5
71- name : Build and push image
80+ name : Build monolith image
81+ if : steps.check_monolith_image.outputs.exists == 'false'
7282 with :
7383 context : .
7484 file : Util/Docker/Development.Dockerfile
7585 target : monolith
7686 tags : rwthika/carla-simulator:monolith${{ env.IMAGE_TAG_SUFFIX }}
7787 no-cache : true
78- push : true
88+ push : false
7989 secrets : |
8090 "epic_user=${{ secrets.EPIC_USER }}"
8191 "epic_token=${{ secrets.EPIC_TOKEN }}"
You can’t perform that action at this time.
0 commit comments