Sanjeeth commited on
Commit
ff9f514
·
unverified ·
1 Parent(s): 4be6a73

Create discord-notification.yml

Browse files
.github/workflows/discord-notification.yml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Notify Discord on Push
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # Change this to the branch you want to trigger notifications on
7
+
8
+ jobs:
9
+ notify-discord:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Send Discord Notification
14
+ run: |
15
+ curl -H "Content-Type: application/json" \
16
+ -d "{\"username\": \"GitHub Bot\", \"content\": \"🔔 **New Push by ${{ github.actor }}** on branch **${{ github.ref_name }}** in repository **${{ github.repository }}**. [View Commit(s)](${{
17
+ github.event.compare }})\"}" \
18
+ ${{ secrets.DISCORD_WEBHOOK_URL }}