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