Fix: Docker Tag-Format für Feature Branches (Slash Bindestrich), GitHub Actions Pipeline korrigiert

This commit is contained in:
vibe-bot 2025-08-09 02:14:08 +02:00
parent 17fa64c05a
commit eac3cdecad
3 changed files with 16 additions and 5 deletions

View file

@ -24,6 +24,17 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate Docker tag
id: docker_tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "tag=main" >> $GITHUB_OUTPUT
else
# Ersetze Slashes durch Bindestriche für gültige Docker Tags
CLEAN_TAG=$(echo "${{ github.ref_name }}" | sed 's/\//-/g')
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
fi
- name: Build and push
uses: docker/build-push-action@v5
with:
@ -32,5 +43,5 @@ jobs:
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ github.sha }}
${{ env.IMAGE_NAME }}:${{ github.ref_name }}
${{ env.IMAGE_NAME }}:${{ steps.docker_tag.outputs.tag }}
platforms: linux/amd64