From b7c6149fb79721db3e0b5f5cf6c935b85d3fb2e0 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Tue, 10 Jun 2025 23:24:03 +0530 Subject: [PATCH] Correcting syntax --- .gitea/workflows/test_image_build_push.yml | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml index 749327a..26b78f7 100644 --- a/.gitea/workflows/test_image_build_push.yml +++ b/.gitea/workflows/test_image_build_push.yml @@ -9,21 +9,22 @@ jobs: outputs: new_version: ${{ steps.new_version.outputs.new_version }} steps: - - name: Check out repository code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - id: new_version - run: | - VERSION=$(git describe --tags --abbrev=0) - echo ${VERSION} - MAJOR=$(echo ${VERSION} | cut -d "." -f 1) - MINOR=$(echo ${VERSION} | cut -d "." -f 2) - PATCH=$(echo ${VERSION} | cut -d "." -f 3) - NEW_PATCH=$(( ${PATCH} + 1)) - echo ${NEW_PATCH} - echo "new_version=$($MAJOR.$MINOR.$NEW_PATCH)" >> $GITHUB_OUTPUT - echo ${new_version} + - name: Check out repository code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Get new version + id: new_version + run: | + VERSION=$(git describe --tags --abbrev=0) + echo ${VERSION} + MAJOR=$(echo ${VERSION} | cut -d "." -f 1) + MINOR=$(echo ${VERSION} | cut -d "." -f 2) + PATCH=$(echo ${VERSION} | cut -d "." -f 3) + NEW_PATCH=$(( ${PATCH} + 1)) + echo ${NEW_PATCH} + echo "new_version=$($MAJOR.$MINOR.$NEW_PATCH)" >> $GITHUB_OUTPUT + echo ${new_version} build: runs-on: ubuntu-latest needs: tag