ci: don't rebuild the docker image on a registration dispatch (#711)

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.
This commit is contained in:
Darko Gjorgjijoski
2026-07-29 14:31:23 +02:00
committed by GitHub
parent 9eeb141b0d
commit 00cb1a6389

View File

@@ -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