Skip to content

Commit 3e91b34

Browse files
committed
ci(workflow): add notify pr discord workflow
1 parent 22b3b51 commit 3e91b34

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Notify Discord on PR
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Setup Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.9"
18+
19+
- name: Install dependencies
20+
run: pip install requests
21+
22+
- name: Notify Discord
23+
env:
24+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
25+
DISCORD_MAP: ${{ secrets.DISCORD_MAP }}
26+
PR_TITLE: ${{ github.event.pull_request.title }}
27+
PR_URL: ${{ github.event.pull_request.html_url }}
28+
PR_AUTHOR: ${{ github.actor }}
29+
REPO_NAME: ${{ github.repository }}
30+
run: python .github/scripts/notify_discord.py

0 commit comments

Comments
 (0)