Create discord_notif.yml
Browse files
.github/workflows/discord_notif.yml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Discord Notification
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [main]
|
6 |
+
|
7 |
+
jobs:
|
8 |
+
notify:
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
|
11 |
+
steps:
|
12 |
+
- name: Send Discord notification
|
13 |
+
env:
|
14 |
+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
15 |
+
run: |
|
16 |
+
curl -X POST -H "Content-Type: application/json" \
|
17 |
+
-d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR. The last merged pull request is called '${{ github.event.head_commit.message }}'. Wormington just became an even more scholarly scholar! πππππ\"}" \
|
18 |
+
$DISCORD_WEBHOOK_URL
|