Skip to content

Commit 3c1bf1a

Browse files
committed
feat: test for branch
1 parent 5899559 commit 3c1bf1a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- name: Get channel information
3333
id: get-channel
3434
run: |
35+
echo "Current branch: ${{ steps.branch-names.outputs.current_branch }}"
3536
branch_name=${{ steps.branch-names.outputs.current_branch }}
3637
3738
content=$(cat .releaserc)

test.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
branch_name=$(git rev-parse --abbrev-ref HEAD)
2+
3+
content=$(cat .releaserc)
4+
5+
channel=$(echo "$content" | jq -r --arg branch "$branch_name" '.branches[] | select(.name | test("^" + $branch + "$")) | .channel')
6+
7+
echo "::set-output name=channel::$channel"

0 commit comments

Comments
 (0)