forked from itzg/docker-minecraft-server
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.37 KB
/
discord.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
name: Discord notifications
on:
release:
types:
- published
workflow_run:
workflows: ["Build and Publish"]
types:
- completed
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
jobs:
discord:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: on-publish
if: github.event_name == 'release' && github.event.action == 'published'
uses: SethCohen/[email protected]
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
- name: on-success
if: github.event.workflow_run.conclusion == 'success'
uses: Ilshidur/action-discord@master
with:
args: |
Github repo: ${{ github.repository }}
- Branch: ${{ github.event.workflow_run.head_branch }}
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏
- name: on-failure
if: github.event.workflow_run.conclusion == 'failure'
uses: Ilshidur/action-discord@master
with:
args: |
Github repo: ${{ github.repository }}
- Branch: ${{ github.event.workflow_run.head_branch }}
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥