Update docker-build.yml workflow

This commit is contained in:
2026-07-02 10:03:14 -05:00
parent 92ffa43e73
commit 5e346dd4b4
+8 -1
View File
@@ -2,7 +2,7 @@ name: Build and Push Docker Image
on: on:
push: push:
branches: [main] branches: [master]
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -26,3 +26,10 @@ jobs:
IMAGE="registry.alwisp.com/${{ gitea.repository }}" IMAGE="registry.alwisp.com/${{ gitea.repository }}"
docker build -t "${IMAGE}:latest" . docker build -t "${IMAGE}:latest" .
docker push "${IMAGE}:latest" docker push "${IMAGE}:latest"
# Dangling-only prune: removes untagged leftovers from previous builds.
# Never removes the tagged :latest (kept for the Unraid deployment) or
# any image referenced by a container.
- name: Prune dangling images on host
if: always()
run: docker image prune -f 2>/dev/null || true