-
-
Notifications
You must be signed in to change notification settings - Fork 100
65 lines (56 loc) · 2.45 KB
/
notify.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
name: "Discord Notification"
on: [pull_request, issues]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push Notification
if: github.event_name == 'push' && github.repository_owner == 'hugsy'
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: "[${{ github.repository }}] ${{ github.actor }} pushed to `${{ github.ref }}`"
description: |
**Commit delta**: `${{ github.event.before }}` → `${{ github.event.after }}`
---
**Changes**: ${{ github.event.compare }}
---
**Commits**:
● ${{ join(github.event.commits.*.message, '
● ') }}
color: 0x0000ff
username: ${{ github.actor }} on CEMU
avatar_url: https://snipstock.com/assets/cdn/png/new/23ee1d96fccd86fd70f6d8e9bd67d81b.png
- name: Pull Request Notification
if: github.event_name == 'pull_request' && github.event.action == 'opened' && github.repository_owner == 'hugsy'
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: "[${{ github.repository }}] ${{ github.actor }} created a new Pull Request (`#${{ github.event.pull_request.number }}`)"
description: |
**${{ github.event.pull_request.title }}**
${{ github.event.pull_request.body }}
---
Link: ${{ github.event.pull_request.html_url }}
color: 0xff0000
username: ${{ github.actor }} on CEMU
avatar_url: https://snipstock.com/assets/cdn/png/new/23ee1d96fccd86fd70f6d8e9bd67d81b.png
- name: Issue Notification
if: github.event_name == 'issues' && github.event.action == 'opened' && github.repository_owner == 'hugsy'
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: "[${{ github.repository }}] ${{ github.actor }} created a new Issue (`#${{ github.event.issue.number }}`)"
description: |
**${{ github.event.issue.title }}**
${{ github.event.issue.body }}
---
Link: ${{ github.event.issue.html_url }}
color: 0x00ff00
username: ${{ github.actor }} on CEMU
avatar_url: https://snipstock.com/assets/cdn/png/new/23ee1d96fccd86fd70f6d8e9bd67d81b.png