Skip to content

Commit

Permalink
allow rm to fail, if no image
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed Aug 31, 2024
1 parent 86a0c98 commit 02065d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/default__deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo "Old image hash: $(docker inspect --format '{{ index .RepoDigests 0 }}' ${{ env.IMAGE_NAME_WITH_TAG }})"
docker compose down
docker image rm ${{ env.IMAGE_NAME_WITH_TAG }}
docker image rm ${{ env.IMAGE_NAME_WITH_TAG }} || true
docker compose up -d
Expand Down
4 changes: 3 additions & 1 deletion scripts/deploy-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ fi
ssh $REMOTE_HOST "cd $REMOTE_PATH && \
docker compose down && \
docker image rm $IMAGE_NAME_WITH_TAG && \
# allow rm to fail, if no image
docker image rm $IMAGE_NAME_WITH_TAG || true && \
docker compose up -d"

0 comments on commit 02065d7

Please sign in to comment.