Skip to content

Commit

Permalink
Update branching.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
malikparvez authored Mar 5, 2024
1 parent b5afbf4 commit bdc9085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/branching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: get_tags
run: |
version=$(curl -sL https://api.github.com/repos/${GITHUB_REPOSITORY}/tags | jq -r '.[0].name')
echo "version=$version" >> $GITHUB_ENV
echo "version=$version" >> $GITHUB_OUTPUT
- name: Compare versions
id: compare_versions
Expand All @@ -28,13 +28,13 @@ jobs:
major_version2=$(echo "$version2" | cut -d'.' -f1 | sed 's/[^0-9]//g')
if [ "$major_version2" -gt "$major_version1" ]; then
echo "major_version_upgrade=true" >> $GITHUB_ENV
echo "major_version_upgrade=true" >> $GITHUB_OUTPUT
else
echo "major_version_upgrade=false" >> $GITHUB_ENV
echo "major_version_upgrade=false" >> $GITHUB_OUTPUT
fi
- name: Create branch if major version upgrade
if: env.major_version_upgrade == 'true'
if: steps.compare_versions.outputs.major_version_upgrade == 'true'
run: |
git checkout main
echo "yaaay"

0 comments on commit bdc9085

Please sign in to comment.