From 00cb1a638982e261552ee586c8ff31243ae73298 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:31:23 +0200 Subject: [PATCH] ci: don't rebuild the docker image on a registration dispatch (#711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit manual_docker_build fires on any workflow_dispatch, and pushes invoiceshelf/invoiceshelf:${{ inputs.tag }} where tag is required and defaults to "latest". Dispatching to re-register a release therefore also rebuilt from the dispatched branch and overwrote the published :latest image — from 3.x that would hand every :latest user a 3.0.0-alpha build. The registration path added in #709 is meant to be a safe recovery route, so triggering it must not have that side effect. A dispatch carrying register_tag now runs registration only. --- .github/workflows/docker.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6c7a55a0..17142bd1 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -297,7 +297,11 @@ jobs: manual_docker_build: name: 🛠️ Manual Docker Build - if: github.event_name == 'workflow_dispatch' + # A dispatch carrying register_tag is asking to register a release, not to + # build an image. Without this guard it would also run, and `tag` defaults to + # "latest" — so re-registering a release would rebuild from this branch and + # overwrite the published :latest image. + if: github.event_name == 'workflow_dispatch' && inputs.register_tag == '' needs: - tests runs-on: ubuntu-latest