Skip to content

Commit a5d3b4c

Browse files
committed
Fix Discord webhook env passing
1 parent a2115b4 commit a5d3b4c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/discord-notify.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Send Discord notification
12+
env:
13+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
14+
PR_TITLE: ${{ github.event.pull_request.title }}
15+
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
16+
PR_URL: ${{ github.event.pull_request.html_url }}
1217
run: |
13-
curl -H "Content-Type: application/json" -d "{\"content\": \"🔔 New Pull Request opened: **${{ github.event.pull_request.title }}** by ${{ github.event.pull_request.user.login }}\n${{ github.event.pull_request.html_url }}\"}" ${{ secrets.DISCORD_WEBHOOK }}
18+
curl -H "Content-Type: application/json" -d "{\"content\": \"New Pull Request opened: **${PR_TITLE}** by ${PR_AUTHOR} - ${PR_URL}\"}" "$DISCORD_WEBHOOK"

0 commit comments

Comments
 (0)