Skip to content

Commit 02065d7

Browse files
committed
allow rm to fail, if no image
1 parent 86a0c98 commit 02065d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/default__deploy-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
echo "Old image hash: $(docker inspect --format '{{ index .RepoDigests 0 }}' ${{ env.IMAGE_NAME_WITH_TAG }})"
3838
3939
docker compose down
40-
docker image rm ${{ env.IMAGE_NAME_WITH_TAG }}
40+
docker image rm ${{ env.IMAGE_NAME_WITH_TAG }} || true
4141
4242
docker compose up -d
4343

scripts/deploy-docker.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ fi
1414
ssh $REMOTE_HOST "cd $REMOTE_PATH && \
1515
1616
docker compose down && \
17-
docker image rm $IMAGE_NAME_WITH_TAG && \
17+
18+
# allow rm to fail, if no image
19+
docker image rm $IMAGE_NAME_WITH_TAG || true && \
1820
1921
docker compose up -d"
2022

0 commit comments

Comments
 (0)