From 5a5942c4807541fd78f1b76e1e7f2c495dc68fb6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 18:56:43 +0000 Subject: [PATCH] build: delete images safely and securily - xargs -r -- only run the docker rmi command if there are images to delete - --force -- delete even if used --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 18041ad..760ae58 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,7 +13,7 @@ jobs: - name: Clear image from cache run: | - docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs docker rmi + docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs -r docker rmi --force docker system prune --force --all - name: Build