From ab1166566576ee2b384d3450002ad41a554d64eb Mon Sep 17 00:00:00 2001 From: donpat1to Date: Sat, 4 Oct 2025 02:06:22 +0200 Subject: [PATCH] dani des is men push vorm pennen gehen --- .gitea/workflows/build.yaml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2cffcf6..babc9f9 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -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 }} \ No newline at end of file + 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" \ No newline at end of file