build and push when tag is set

This commit is contained in:
2026-03-13 18:11:52 +01:00
parent 96dbea735c
commit f29fb3ae44

View File

@@ -1,13 +1,10 @@
name: build-image
run-name: build and push Docker-Image
run-name: build and push Docker-Image with tag:${{ github.ref_name }}
on:
workflow_dispatch: # Manuelles Auslösen des Workflows
inputs:
image_tag:
description: '2. Tag für das Docker-Image (außer latest) (z.B. v1.0.0)'
required: true
default: '1.0.0'
push:
tags:
- "*"
env:
image_name: mysteryhelfer
@@ -47,7 +44,7 @@ jobs:
--file ./Dockerfile \
--platform linux/amd64,linux/arm64 \
--tag ${{ env.registry_gitea }}/${{ env.user }}/${{ env.image_name }}:latest \
--tag ${{ env.registry_gitea }}/${{ env.user }}/${{ env.image_name }}:${{ github.event.inputs.image_tag }} \
--tag ${{ env.registry_gitea }}/${{ env.user }}/${{ env.image_name }}:${{ github.ref_name }} \
--tag ${{ env.user }}/${{ env.image_name }}:latest \
--tag ${{ env.user }}/${{ env.image_name }}:${{ github.event.inputs.image_tag }} \
--tag ${{ env.user }}/${{ env.image_name }}:${{ github.ref_name }} \
--push ./