Skip to content

Commit 8458401

Browse files
committed
🐋 ci: Update Docker image removal command in deploy workflow
1 parent f9d4078 commit 8458401

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,15 @@ jobs:
3030
DO_USER: ${{ secrets.DO_USER }}
3131
run: |
3232
ssh -o StrictHostKeyChecking=no ${DO_USER}@${DO_HOST} << EOF
33-
sudo -i -u danny bash << EEOF
3433
cd ~/LibreChat && \
3534
git fetch origin main && \
36-
npm run stop:deployed && \
37-
docker images -a | grep "librechat" | awk '{print \$3}' | xargs docker rmi && \
38-
npm run update:deployed && \
35+
sudo npm run stop:deployed && \
36+
sudo docker images --format "{{.Repository}}:{{.ID}}" | grep -E "lc-dev|librechat" | cut -d: -f2 | xargs -r sudo docker rmi -f || true && \
37+
sudo npm run update:deployed && \
3938
git checkout dev && \
4039
git pull origin dev && \
4140
git checkout do-deploy && \
4241
git rebase dev && \
43-
npm run start:deployed && \
42+
sudo npm run start:deployed && \
4443
echo "Update completed. Application should be running now."
45-
EEOF
4644
EOF

0 commit comments

Comments
 (0)