Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
XComp committed Apr 2, 2024
1 parent a52bdcd commit b84d45b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/actions/release_branch_extraction/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,20 @@ runs:
id: release_branch_extraction_step
shell: bash
run: |
# fetch branch information first
git fetch origin
git branch -r
release_branches_ordered_by_version="$(git branch -r | grep origin | grep -o '[^/]*$' | grep 'release-[1-9]\.[0-9]*$' | sort --field-separator '-' --key 2V)"
newest_release_branch="$(echo $release_branches_ordered_by_version | tail -1 | head -1)"
penultimate_release_branch="$(echo $release_branches_ordered_by_version | tail -2 | head -1)"
antepenultimate_release_branch="$(echo $release_branches_ordered_by_version | tail -3 | head -1)"
echo "Extracted release branches:"
echo " Branch of newest release: ${newest_release_branch}"
echo " Branch of release that preceded the newest release: ${penultimate_release_branch}"
echo " Branch of that got deprecated most-recently: ${antepenultimate_release_branch}"
echo "newest_release=${newest_release_branch}" >> ${GITHUB_OUTPUT}
echo "penultimate_release=${penultimate_release_branch}" >> ${GITHUB_OUTPUT}
echo "antepenultimate_release=${antepenultimate_release_branch}" >> ${GITHUB_OUTPUT}

0 comments on commit b84d45b

Please sign in to comment.