-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (30 loc) · 1.34 KB
/
discord.yaml
File metadata and controls
33 lines (30 loc) · 1.34 KB
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
name: Discord notification
# TODO: We will change this workflow later into a 'workflow_call' allowing us to send various notifications from other workflows easily
#
on:
push:
branches: '*'
jobs:
notify_discord_commits_pushed:
name: Notify discord (commits)
runs-on: ubuntu-latest
strategy:
# Only send commits one-by-one
max-parallel: 1
matrix:
commit: ${{ github.event.commits }}
env:
GHITHUB_USER_LINK: '[${{ matrix.commit.author.name }}](<https://github.com/${{ matrix.commit.author.name }}>)'
GHITHUB_REPO_URL: 'https://github.com/${{ github.event.repository.full_name }}'
GHITHUB_REPO_LINK: '[${{ github.event.repository.full_name }}](<https://github.com/${{ github.event.repository.full_name }}>)'
steps:
- name: Notify build started
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_YUKI }}
DISCORD_USERNAME: 'Yuki <IceShard Engine>'
with:
args: |
New commit in ${{ env.GHITHUB_REPO_LINK }} on branch [{{ ('${{ github.event.ref }}').split('/').pop() }}](<${{ env.GHITHUB_REPO_URL }}/tree/{{ ('${{ github.event.ref }}').split('/').pop() }}>)
-# See [changes](<${{ matrix.commit.url }}>) by ${{ env.GHITHUB_USER_LINK }} (sha: ${{ matrix.commit.id }})
>>> ${{ matrix.commit.message }}