From 955e2faa3f1f60a33127b5701b3f1a3150f178a3 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 10 Oct 2026 20:53:41 +0200 Subject: [PATCH] Remove untagged images after a healthy deploy Every deploy leaves the previous :latest behind untagged on Unraid. The deploy job now prunes untagged images once the health gate passed; a rollback pulls its : from the registry anyway. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/deploy.yml | 5 +++++ docs/deployment.md | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 425c791..a02866c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -119,3 +119,8 @@ jobs: echo "eb-blazor did not report healthy within 60 seconds." >&2 docker logs --tail 50 eb-blazor >&2 exit 1 + + # Every deploy leaves the previous :latest behind as an untagged image. Only + # untagged images go; a rollback pulls its : from the registry anyway. + - name: Remove untagged images + run: docker image prune -f diff --git a/docs/deployment.md b/docs/deployment.md index a202326..8f10b78 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -130,6 +130,8 @@ Merge the pull request into `main`. The workflow then: `compose.yaml` — only containers whose image or config changed are recreated, 3. checks `http://eb-blazor:8080/health` from inside `proxynet` (health gate). A red run means the new version is live but not healthy: roll back (below). +4. removes untagged images (`docker image prune -f`) — the previous `:latest` + loses its tag on every deploy and would pile up on Unraid otherwise. Pushes that only touch `docs/` or Markdown files trigger nothing. A manual run (**Actions** → **Build and deploy** → **Run workflow**) redeploys the current