forked from activepieces/activepieces
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.6 KB
/
discord-notifications.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
name: discord notifications
on:
workflow_run:
workflows:
- "Release Pieces"
- "build-cloud-nx"
types: [completed]
branches: [main]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: >-
curl ${{ secrets.DISCORD_CI_CHANNEL_WEBHOOK_URL }}
-H 'Content-Type: application/json'
-d '{
"embeds": [
{
"title": "${{ github.event.repository.name }} build success - ${{ github.event.workflow_run.name }} #${{ github.event.workflow_run.run_number }}",
"description": ${{ toJSON(github.event.workflow_run.head_commit.message) }},
"url": "${{ github.event.workflow_run.html_url }}",
"color": 39236
}
],
"username": "GitHub Actions"
}'
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: >-
curl ${{ secrets.DISCORD_CI_CHANNEL_WEBHOOK_URL }}
-H 'Content-Type: application/json'
-d '{
"embeds": [
{
"title": "${{ github.event.repository.name }} build failure - ${{ github.event.workflow_run.name }} #${{ github.event.workflow_run.run_number }}",
"description": ${{ toJSON(github.event.workflow_run.head_commit.message) }},
"url": "${{ github.event.workflow_run.html_url }}",
"color": 13565967
}
],
"username": "GitHub Actions"
}'