Skip to content

Commit

Permalink
fix(gha): fix branch detection error (#6350)
Browse files Browse the repository at this point in the history
from e.g. https://github.com/spinnaker/clouddriver/actions/runs/13418069226/job/37483771864

Run BRANCHES=$(git branch -r --contains refs/tags/v5.91.0)
BRANCHES is '  origin/HEAD -> origin/master
  origin/master'
NUM_BRANCHES is '2'
exactly one branch required to release clouddriver, but there are 2 (  origin/HEAD -> origin/master
  origin/master)
  • Loading branch information
dbyron-sf authored Feb 19, 2025
1 parent 15f5d51 commit 8ff849d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# Given a tag, determine what branch we are on, so we can bump dependencies (or not)
- name: Get Branch
run: |
BRANCHES=$(git branch -r --contains ${{ github.ref }})
BRANCHES=$(git branch -r --contains ${{ github.ref }} | grep -v 'HEAD')
echo "BRANCHES is '${BRANCHES}'"
# Check for no branches explicitly...Otherwise echo adds a newline so wc thinks there's
# one branch. And echo -n makes it appears that there's one less branch than there
Expand Down

0 comments on commit 8ff849d

Please sign in to comment.