Skip to content

Commit

Permalink
Handle existing upgrade branches
Browse files Browse the repository at this point in the history
Co-authored-by: Wayne Adams <wayne.adams@broadcom.com>
Co-authored-by: Janice Bailey <janice.bailey@broadcom.com>
  • Loading branch information
wayneadams and bjanice75 committed Mar 11, 2024
1 parent e544caa commit 1ee3497
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/upgrade-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ jobs:
git config --global user.name "tas-operability-bot"
branch_suffix=$(echo "${GITHUB_SHA}" | cut -c1-7)
branch_name="tmp/upgrade-golang-${branch_suffix}"
if git show-ref --exists "refs/heads/${branch_name}"; then
echo "Branch ${branch_name} already exists. Exiting..."
exit 0
fi
git checkout -b tmp/upgrade-golang-${branch_suffix}
git add .
git commit -m "Upgrade Golang"
Expand Down

0 comments on commit 1ee3497

Please sign in to comment.