From 4f1e001fdcd8c3a6cf9e1b315d3db60e521d0199 Mon Sep 17 00:00:00 2001 From: Milian Date: Sun, 6 Oct 2024 19:21:49 +0200 Subject: [PATCH] adapt action - add cleanup for images --- .github/workflows/jekyll-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jekyll-deploy.yml b/.github/workflows/jekyll-deploy.yml index 5785aa0..8cde5d2 100644 --- a/.github/workflows/jekyll-deploy.yml +++ b/.github/workflows/jekyll-deploy.yml @@ -41,6 +41,7 @@ jobs: ssh -i ${HOME}/.ssh/deploy.id_rsa -o StrictHostKeyChecking=no root@saturn.munichmakerlab.de << EOF set -x # Enable command echoing docker pull ghcr.io/munichmakerlab/website:main + docker images | grep ghcr.io/munichmakerlab/website | grep -v main | awk '{print $3}' | xargs docker rmi #remove old images systemctl restart docker-website.service systemctl status docker-website.service EOF