diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml index f74f74f..18792f0 100644 --- a/.gitea/workflows/test_image_build_push.yml +++ b/.gitea/workflows/test_image_build_push.yml @@ -18,14 +18,18 @@ jobs: with: distribution: 'zulu' java-version: '17' - - name: Install AWK - run: sudo apt-get update && sudo apt-get install -y gawk - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 - name: Get latest tag - run: echo "VERSION=$(git describe --tags --abbrev=0)" + run: | + echo "VERSION=$(git describe --tags --abbrev=0)" + MAJOR=$(echo $VERSION | cut -d "." -f 1) + MINOR=$(echo $VERSION | cut -d "." -f 2) + PATCH=$(echo $VERSION | cut -d "." -f 3) - name: Increment version - run: echo "NEW_VERSION=$(echo $VERSION | awk -F'v' '{print $2}' | awk -F. '{print "v"$1"."$2"."$3+1}')" + run: | + PATCH=$((PATCH + 1)) + echo "NEW_VERSION=$(echo $MAJOR.$MINOR.$PATCH)" - name: Extract commit message run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" - name: Create and push tag