We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ce2354 commit 627b4e6Copy full SHA for 627b4e6
1 file changed
.github/workflows/main.yml
@@ -0,0 +1,24 @@
1
+name: Discord Push Notifications
2
+
3
+on:
4
+ push:
5
+ branches: [ main ]
6
7
+jobs:
8
+ notify:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Send commit message to Discord
12
+ run: |
13
+ COMMIT_MSG="${{ github.event.head_commit.message }}"
14
+ COMMIT_URL="${{ github.event.head_commit.url }}"
15
+ REPO="${{ github.repository }}"
16
+ ACTOR="${{ github.actor }}"
17
18
+ PAYLOAD=$(jq -n \
19
+ --arg content "🚀 $ACTOR pushed to **main** in [$REPO]($COMMIT_URL):\n- $COMMIT_MSG" \
20
+ '{content: $content}')
21
22
+ curl -H "Content-Type: application/json" \
23
+ -d "$PAYLOAD" \
24
+ ${{ secrets.DISCORD_WEBHOOK }}
0 commit comments