Skip to content

Commit fce07ff

Browse files
committed
Add Discord activity workflow for GitHub events
1 parent f56d424 commit fce07ff

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Discord: repo activity"
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
types:
8+
[
9+
opened,
10+
reopened,
11+
synchronize,
12+
closed,
13+
edited,
14+
converted_to_draft,
15+
ready_for_review,
16+
]
17+
issues:
18+
types: [opened, closed, edited, reopened]
19+
release:
20+
types: [published, released]
21+
workflow_dispatch:
22+
23+
jobs:
24+
notify:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Post to Discord
28+
uses: Ilshidur/action-discord@0.4.0
29+
env:
30+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
31+
GITHUB_EVENT_NAME: ${{ github.event_name }}
32+
GITHUB_ACTOR: ${{ github.actor }}
33+
GITHUB_REF: ${{ github.ref }}
34+
# Optional cosmetics:
35+
# DISCORD_USERNAME: "GitHub Bot"
36+
# DISCORD_AVATAR: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
37+
with:
38+
# You can customize this message freely (supports interpolation)
39+
args: >
40+
[{{ EVENT_PAYLOAD.repository.full_name }}] {{ GITHUB_EVENT_NAME }} by {{ GITHUB_ACTOR }}
41+
• Ref: {{ GITHUB_REF }}
42+
• Link: https://github.com/{{ EVENT_PAYLOAD.repository.full_name }}

0 commit comments

Comments
 (0)