diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0cc37d0..5c6f4d3 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -12,6 +12,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Extract tag name + run: | + if [[ "$GITEA_REF" =~ ^refs/tags/v ]]; then + TAG_NAME=${GITEA_REF#refs/tags/v} + echo "Extracted tag name: $TAG_NAME" + else + echo "This is not a tag push with 'v' prefix, skipping..." + - name: Set up JDK 21 uses: actions/setup-java@v2 with: @@ -48,9 +56,12 @@ jobs: needs: build-jar steps: - name: Extract tag name - id: get_tag run: | - echo TAG_NAME=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT + if [[ "$GITEA_REF" =~ ^refs/tags/v ]]; then + TAG_NAME=${GITEA_REF#refs/tags/v} + echo "Extracted tag name: $TAG_NAME" + else + echo "This is not a tag push with 'v' prefix, skipping..." - name: Initialize Docker runtime run: |