Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

Commit 208d247

Browse files
authored
fix(gha): fix branch detection error (#1205)
from e.g. https://github.com/spinnaker/fiat/actions/runs/13405954400/job/37445817517 Run BRANCHES=$(git branch -r --contains refs/tags/v1.54.0) BRANCHES is ' origin/HEAD -> origin/master origin/master' NUM_BRANCHES is '2' exactly one branch required to release fiat, but there are 2 ( origin/HEAD -> origin/master origin/master) Error: Process completed with exit code 1.
1 parent e4f6209 commit 208d247

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Given a tag, determine what branch we are on, so we can bump dependencies in the correct branch
2121
- name: Get Branch
2222
run: |
23-
BRANCHES=$(git branch -r --contains ${{ github.ref }})
23+
BRANCHES=$(git branch -r --contains ${{ github.ref }} | grep -v 'HEAD')
2424
echo "BRANCHES is '${BRANCHES}'"
2525
# Check for no branches explicitly...Otherwise echo adds a newline so wc thinks there's
2626
# one branch. And echo -n makes it appears that there's one less branch than there

0 commit comments

Comments
 (0)