From 89d8d1448a934c37fcb351442b6d272cbdb2b3cf Mon Sep 17 00:00:00 2001 From: Malik Parvez <84777619+malikparvez@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:03:51 +0530 Subject: [PATCH] Update branching.yml --- .github/workflows/branching.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/branching.yml b/.github/workflows/branching.yml index 08553fb..3cf151a 100644 --- a/.github/workflows/branching.yml +++ b/.github/workflows/branching.yml @@ -16,25 +16,25 @@ jobs: id: get_tags run: | version=$(curl -sL https://api.github.com/repos/${GITHUB_REPOSITORY}/tags | jq -r '.[0].name') - echo "::set-output name=version::$version" + echo "version=$version" >> $GITHUB_ENV - name: Compare versions id: compare_versions run: | version1="${{ steps.get_tags.outputs.version }}" - version2="v2.3.1" # Manually provided version + version2="v4.3.1" # Manually provided version major_version1=$(echo "$version1" | cut -d'.' -f1 | sed 's/[^0-9]//g') major_version2=$(echo "$version2" | cut -d'.' -f1 | sed 's/[^0-9]//g') - if [ "$major_version1" -gt "$major_version2" ]; then - echo "::set-output name=major_version_upgrade::true" + if [ "$major_version2" -gt "$major_version1" ]; then + echo "major_version_upgrade=true" >> $GITHUB_ENV else - echo "::set-output name=major_version_upgrade::false" + echo "major_version_upgrade=false" >> $GITHUB_ENV fi - name: Create branch if major version upgrade - if: steps.compare_versions.outputs.major_version_upgrade == 'true' + if: env.major_version_upgrade == 'true' run: | - git checkout -b new_branch - git push origin new_branch + git checkout main + echo "yaaay"