dani des is men push vorm pennen gehen
Some checks failed
Gitea CI/CD / Set Tag Name (push) Successful in 6s
Gitea CI/CD / build-and-test (push) Successful in 48s
Gitea CI/CD / Create Tag (push) Has been cancelled
Gitea CI/CD / docker-build-and-push (push) Has been cancelled

This commit is contained in:
2025-10-04 02:06:22 +02:00
parent 37468b6785
commit ab11665665

View File

@@ -118,12 +118,29 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Git user
- name: Check if tag already exists
id: check_tag
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git fetch --tags
if git rev-parse "${{ needs.set-tag.outputs.tag_name }}" >/dev/null 2>&1; then
echo "Tag ${{ needs.set-tag.outputs.tag_name }} already exists!"
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "Tag ${{ needs.set-tag.outputs.tag_name }} does not exist"
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Create and push tag
if: steps.check_tag.outputs.exists == 'false'
run: |
echo "Creating new tag: ${{ needs.set-tag.outputs.tag_name }}"
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git tag ${{ needs.set-tag.outputs.tag_name }}
git push origin ${{ needs.set-tag.outputs.tag_name }}
git push origin ${{ needs.set-tag.outputs.tag_name }}
echo "Tag created and pushed successfully"
- name: Skip tag creation
if: steps.check_tag.outputs.exists == 'true'
run: |
echo "Skipping tag creation - ${{ needs.set-tag.outputs.tag_name }} already exists"