Skip to content

Commit 7723838

Browse files
committed
chore(ci): Publish - hardcode branch/is_master for branch detector
1 parent d7dc5fe commit 7723838

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -793,26 +793,10 @@ jobs:
793793
uses: actions/checkout@v4
794794
- name: Detect branch name
795795
id: detect_branch
796-
env:
797-
EVENT_BASE_REF: ${{ github.event.base_ref || 'tag_on_unknown_branch_commit_not_pushed' }}
798796
run: |
799-
BRANCH=${EVENT_BASE_REF#refs/heads/}
800-
801-
if [ "$BRANCH" == "tag_on_unknown_branch_commit_not_pushed" ]; then
802-
echo "Error: Could not detect branch name. Most likely this is that commit for tag is not pushed yet."
803-
exit 1
804-
fi
805-
806-
echo "Detected branch: $BRANCH"
807-
IS_MASTER=false
808-
809-
if [ "$BRANCH" == "master" ]; then
810-
IS_MASTER=true
811-
fi
812-
echo "Detected is_master: $IS_MASTER"
813-
814-
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
815-
echo "is_master=$IS_MASTER" >> "$GITHUB_OUTPUT"
797+
# Git & GitHub (for now) doesn't provide an easy/stable way to detect branch name from tag.
798+
echo "branch=master" >> "$GITHUB_OUTPUT"
799+
echo "is_master=true" >> "$GITHUB_OUTPUT"
816800
817801
trigger-repo-sync:
818802
name: Trigger runtime repo

0 commit comments

Comments
 (0)