From ae34983464a4e22b1f04c8508d84f8c8a08c9e29 Mon Sep 17 00:00:00 2001 From: Adibov Date: Thu, 30 Nov 2023 17:33:29 +0330 Subject: [PATCH] ci: add docker cleanup stage --- .github/workflows/deploy.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4894b25..aaa1e9c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -56,4 +56,15 @@ jobs: envs: SECRET_KEY,EMAIL_HOST_PASSWORD,ZIFY_AUTH script: | docker compose -f AAISS-2023/docker-compose.yml pull - docker compose -f AAISS-2023/docker-compose.yml up -d --force-recreate --no-build \ No newline at end of file + docker compose -f AAISS-2023/docker-compose.yml up -d --force-recreate --no-build + + - name: Cleanup docker images + uses: appleboy/ssh-action@master + env: + SECRET_KEY: ${{ secrets.SECRET_KEY }} + with: + host: ${{ vars.VM_HOST }} + username: ${{ vars.VM_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + docker image prune -af \ No newline at end of file