Skip to content

Commit

Permalink
ci: fix escape special characters in Discord notification description
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Jan 11, 2025
1 parent 21a393b commit d090a6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/notification/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ runs:
COLOR=9868950
fi
DESCRIPTION=$(echo "${{ inputs.DESCRIPTION }}" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
PAYLOAD=$(cat <<EOF
{
"avatar_url": "https://raw.githubusercontent.com/daodaoedu/daodao-f2e/main/public/daodao-logo.webp",
Expand All @@ -53,7 +55,7 @@ runs:
"icon_url": "${{ inputs.AUTHOR_ICON_URL }}"
},
"title": "${{ inputs.TITLE }}",
"description": "${{ inputs.DESCRIPTION }}",
"description": "$DESCRIPTION",
"color": $COLOR
}
]
Expand Down

0 comments on commit d090a6e

Please sign in to comment.