Skip to content

Commit

Permalink
Check if hotfix branch already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkgang committed Dec 18, 2024
1 parent d6ffd16 commit b7bd97e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
exit 1
fi
branch_name="release/hotfix-${latest_tag}"
if git show-ref --quiet refs/heads/$branch_name; then
echo "# :fire: :warning: Hotfix branch already exists: ${branch_name}" >> $GITHUB_STEP_SUMMARY
exit 0
fi
git switch -c $branch_name $latest_tag
git push origin $branch_name
echo "# :fire: Hotfix branch: ${branch_name}" >> $GITHUB_STEP_SUMMARY

0 comments on commit b7bd97e

Please sign in to comment.