From ab39d200d4010fa55975412bffd6c0455c4946be Mon Sep 17 00:00:00 2001 From: BSL-5 Date: Thu, 15 Aug 2024 12:13:04 -0600 Subject: [PATCH] Update branch getter --- .github/workflows/build-and-commit-release-note.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-commit-release-note.yaml b/.github/workflows/build-and-commit-release-note.yaml index d55df5768..728ea1d10 100644 --- a/.github/workflows/build-and-commit-release-note.yaml +++ b/.github/workflows/build-and-commit-release-note.yaml @@ -16,9 +16,11 @@ jobs: - name: Extract branch name shell: bash run: | - export branch=${{ github.head_ref || github.ref_name }} - echo "branch=${{ github.head_ref || github.ref_name }}" >> $GITHUB_OUTPUT echo "Branch is $branch" + raw=$(git branch -r --contains ${{ github.ref }}) + branch=${raw##*/} + echo "branch=$branch" >> $GITHUB_OUTPUT + echo "Branch is $branch." id: extract_branch