@@ -106,16 +106,31 @@ jobs:
106106 cp ~/.env-production dashboard-production/.env &&
107107 cd dashboard-production &&
108108 git checkout ${GITHUB_SHA} &&
109- docker compose up --pull=always --remove-orphans --detach &&
110- docker image prune -fa --filter "until=48h" &&
111- docker volume ls --filter dangling=true --format "::warning::volume {{.Name}} is dangling" &&
112- docker container ls -f status=exited --format "::warning::container {{.ID}} {{.Status}} ({{.Names}})"
109+ docker compose -f docker-compose-next.yml pull --policy=always &&
110+ docker compose -f docker-compose-next.yml up -d --remove-orphans
113111 "
114112 env :
115113 SSH_USER : ${{ secrets.STAGING_USER }}
116114 SSH_HOST : ${{ secrets.STAGING_HOST }}
117115 SSH_KEY : ${{ secrets.STAGING_KEY }}
118116
117+ - name : Prune docker artifacts on remote
118+ continue-on-error : true
119+ env :
120+ SSH_USER : ${{ secrets.STAGING_USER }}
121+ SSH_HOST : ${{ secrets.STAGING_HOST }}
122+ SSH_KEY : ${{ secrets.STAGING_KEY }}
123+ run : |
124+ eval $(ssh-agent -s)
125+ echo "$SSH_KEY" | ssh-add - >/dev/null
126+ ssh "${SSH_USER}@${SSH_HOST}" <<<'EOF'
127+ set -eu
128+ docker image prune -fa --filter "until=48h"
129+ docker builder prune -f --filter "until=48h"
130+ docker volume ls --filter dangling=true --format "::warning::volume {{.Name}} is dangling"
131+ docker container ls --filter status=exited --format "::warning::container {{.ID}} {{.Status}} ({{.Names}})"
132+ EOF
133+
119134 - name : Discord notification on success
120135 if : success()
121136 env :
0 commit comments