Skip to content

Commit 0efcee8

Browse files
committed
feat: add discord notifications
1 parent 491fe5b commit 0efcee8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Notifications
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
notification:
8+
if: ${{ github.repository_owner == 'WaspScripts' }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Discord notification
12+
shell: bash
13+
run: |
14+
BODY=$(jq -nc \
15+
--arg title "Website Update" \
16+
--arg desc "${{ github.event.head_commit.message }}" \
17+
--arg url "https://github.com/WaspScripts/wasp-webapp/commit/${{ github.event.head_commit.id }}" \
18+
--arg foot "Author: ${{ github.event.head_commit.author.name }}" \
19+
--argjson color 16742912 \
20+
'{embeds:[{title:$title,description:$desc,url:$url,color:$color,footer:{text:$foot}}]}')
21+
curl \
22+
-H "Content-Type: application/json" \
23+
-d "$BODY" \
24+
${{ secrets.UPDATES_WEBHOOK }}

0 commit comments

Comments
 (0)