Skip to content

Commit

Permalink
Attempt to resolve the proper branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Aug 17, 2023
1 parent 1935218 commit aaa6af5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/split_monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ jobs:
branch: ${{ github.ref_name }}

# with tag
-
if: "startsWith(github.ref, 'refs/tags/')"
id: extract-branch-name
run: echo "branch=$(git branch -a --contains ${{ github.sha }} | grep -v 'HEAD' | sed -n 2p | awk '{ printf $1 }' | sed 's/remotes\/origin\///g')" >> $GITHUB_OUTPUT

-
if: "startsWith(github.ref, 'refs/tags/')"
# Uses an action in the root directory
Expand All @@ -78,4 +83,4 @@ jobs:
repository_host: "github.com"
user_name: "mantle-ci"
user_email: "mantle@alley.com"
branch: ${{ github.ref_name }}
branch: ${{ steps.extract-branch-name.outputs.branch }}

0 comments on commit aaa6af5

Please sign in to comment.