Skip to content

Notify Discord on Labeled Discussion #36

Notify Discord on Labeled Discussion

Notify Discord on Labeled Discussion #36

name: Notify Discord on Labeled Discussion
on:
discussion:
types: [created]
jobs:
notify-discord:
runs-on: ubuntu-latest
if: contains(github.event.discussion.body, 'Demo Link (Optional)')
steps:
- name: Send Notification to Discord
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"A new Show and Tell discussion has been created: ${{ github.event.discussion.html_url }}\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}