Skip to content

Commit cd980e3

Browse files
authored
Create discord-webhook.yml
1 parent 82fdac8 commit cd980e3

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

.github/workflows/discord-webhook.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Discord Webhook Notification
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, closed, reopened]
9+
pull_request_review:
10+
types: [submitted, edited, dismissed]
11+
issues:
12+
types: [opened, closed, reopened]
13+
release:
14+
types: [published, edited, released]
15+
check_run:
16+
types: [completed]
17+
check_suite:
18+
types: [completed]
19+
deployment:
20+
types: [created, completed]
21+
22+
jobs:
23+
notify:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Send notification to Discord for Push
27+
if: github.event_name == 'push'
28+
run: |
29+
curl -H "Content-Type: application/json" \
30+
-d "{\"content\": \"New push event in repository: ${{ github.repository }} by ${{ github.actor }}.\"}" \
31+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
32+
33+
- name: Send notification to Discord for Pull Request
34+
if: github.event_name == 'pull_request'
35+
run: |
36+
curl -H "Content-Type: application/json" \
37+
-d "{\"content\": \"New pull request event in repository: ${{ github.repository }} by ${{ github.actor }}.\"}" \
38+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
39+
40+
- name: Send notification to Discord for Pull Request Review
41+
if: github.event_name == 'pull_request_review'
42+
run: |
43+
curl -H "Content-Type: application/json" \
44+
-d "{\"content\": \"New pull request review event in repository: ${{ github.repository }} by ${{ github.actor }}.\"}" \
45+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
46+
47+
- name: Send notification to Discord for Issues
48+
if: github.event_name == 'issues'
49+
run: |
50+
curl -H "Content-Type: application/json" \
51+
-d "{\"content\": \"New issue event in repository: ${{ github.repository }} by ${{ github.actor }}.\"}" \
52+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
53+
54+
- name: Send notification to Discord for Release
55+
if: github.event_name == 'release'
56+
run: |
57+
curl -H "Content-Type: application/json" \
58+
-d "{\"content\": \"New release event in repository: ${{ github.repository }} by ${{ github.actor }}.\"}" \
59+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
60+
61+
- name: Send notification to Discord for Check Run
62+
if: github.event_name == 'check_run'
63+
run: |
64+
curl -H "Content-Type: application/json" \
65+
-d "{\"content\": \"New check run completed in repository: ${{ github.repository }}.\"}" \
66+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
67+
68+
- name: Send notification to Discord for Check Suite
69+
if: github.event_name == 'check_suite'
70+
run: |
71+
curl -H "Content-Type: application/json" \
72+
-d "{\"content\": \"New check suite completed in repository: ${{ github.repository }}.\"}" \
73+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk
74+
75+
- name: Send notification to Discord for Deployment
76+
if: github.event_name == 'deployment'
77+
run: |
78+
curl -H "Content-Type: application/json" \
79+
-d "{\"content\": \"New deployment event in repository: ${{ github.repository }}.\"}" \
80+
https://discord.com/api/webhooks/1286631616931696763/uBh6xUwzrCnamHFURde3lb3MvKSvLv3lWeJs9HaIe-r_Lw4bHXDpkZjwKfuAijSiiSUk

0 commit comments

Comments
 (0)