Skip to content

Commit

Permalink
fix(deploy): clean up unused docker images to prevent space overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RuS2m committed Jun 16, 2024
1 parent 579738d commit 03f8092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push app Docker image
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -77,6 +77,8 @@ jobs:
- name: Replace Running Docker Container
run: |
ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_EXTERNAL_IP }} "
sudo docker image prune -af &&
sudo docker container prune -f &&
sudo docker pull rus2m/achievements-bot-app:latest &&
sudo docker pull rus2m/achievements-bot-cron:latest &&
if [ \$(sudo docker ps -a -q -f name=app) ]; then
Expand Down

0 comments on commit 03f8092

Please sign in to comment.