Skip to content

Commit ae5bafb

Browse files
committed
[chore] notification yaml 줄바꿈 오류 수정
1 parent bac12ea commit ae5bafb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/discussion-notification.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ jobs:
88
notify:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Discord notification
11+
- name: Escape discussion body using jq
12+
id: prepare
13+
run: |
14+
BODY="${{ github.event.discussion.body }}"
15+
CLEAN_BODY=$(jq -Rsa . <<< "$BODY" | sed 's/^"//' | sed 's/"$//')
16+
echo "body=$CLEAN_BODY" >> $GITHUB_OUTPUT
17+
18+
- name: Send Discord notification
1219
uses: Ilshidur/action-discord@0.3.2
1320
env:
1421
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
1522
DISCORD_USERNAME: 디스커션 봇
1623
DISCORD_AVATAR: https://avatars.githubusercontent.com/u/154582156?s=400&u=de1c7ebc9093ce26761a93a1cd78429bc4abe889&v=4
17-
DISCORD_EMBEDS: |
18-
[
19-
{
20-
"title": "${{ github.event.discussion.title }}",
21-
"color": 6253567,
22-
"url": "${{ github.event.discussion.html_url }}",
23-
"description": "${{ github.event.discussion.body }}"
24-
}
25-
]
24+
DISCORD_EMBEDS: >-
25+
[{"title":"${{ github.event.discussion.title }}","color":6253567,"url":"${{ github.event.discussion.html_url }}","description":"${{ steps.prepare.outputs.body }}"}]

0 commit comments

Comments
 (0)