Skip to content

Commit ee23931

Browse files
committed
monit: add workflows
1 parent a69ee0b commit ee23931

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/issue.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Notify on Issue or Comment
2+
3+
on:
4+
issues:
5+
types: [opened, edited]
6+
issue_comment:
7+
types: [created, edited]
8+
9+
10+
jobs:
11+
notify-discord:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Notification
16+
uses: appleboy/telegram-action@master
17+
with:
18+
token: ${{ secrets.BOT_TOKEN }}
19+
to: ${{ secrets.CHAT_ID }}
20+
message: |
21+
Repository: ${{ github.repository }}
22+
Event: ${{ github.event_name }}
23+
Action: ${{ github.event.action }}
24+
25+
Issue Title: ${{ github.event.issue.title }}
26+
Issue URL: ${{ github.event.issue.html_url }}
27+
28+
User: ${{ github.event.issue.user.login }}
29+
Comment: ${{ github.event.comment.body || 'No comment' }}

.github/workflows/pull_request.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Notify on Pull Request
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, closed]
6+
7+
jobs:
8+
notify-telegram:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Send Telegram Notification
13+
uses: appleboy/telegram-action@master
14+
with:
15+
token: ${{ secrets.BOT_TOKEN }}
16+
to: ${{ secrets.CHAT_ID }}
17+
message: |
18+
Repository: ${{ github.repository }}
19+
Event Type: ${{ github.event_name }}
20+
Action: ${{ github.event.action }}
21+
User: ${{ github.event.sender.login }}
22+
23+
Pull Request Title: ${{ github.event.pull_request.title }}
24+
Pull Request URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)