From 4a05ffba950c76ad05eb3263d1a0372eefd97383 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 2 Mar 2024 23:37:37 +0100 Subject: [PATCH] Update build.yml --- .gitea/workflows/build.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 3c5736d..a87c9fa 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -12,19 +12,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Extract tag name - run: | - git fetch --tags - GIT_TAG=$(git tag --points-at HEAD) - echo "GIT_TAG: $GIT_TAG" - if [[ "$GIT_TAG" == v* ]]; then - TAG_NAME=${GIT_TAG#v} - echo "Extracted tag name: $TAG_NAME" - else - echo "This is not a tag push with 'v' prefix, skipping..." - exit 78 - fi - - name: Set up JDK 21 uses: actions/setup-java@v2 with: @@ -62,11 +49,14 @@ jobs: steps: - name: Extract tag name run: | - if [[ "$GITEA_REF" =~ ^refs/tags/v ]]; then - TAG_NAME=${GITEA_REF#refs/tags/v} + GIT_TAG=$(git tag --points-at HEAD) + if [[ "$GIT_TAG" == v* ]]; then + TAG_NAME=${GIT_TAG#v} echo "Extracted tag name: $TAG_NAME" else echo "This is not a tag push with 'v' prefix, skipping..." + exit 78 + fi - name: Initialize Docker runtime run: |