Skip to content

Commit b8cee06

Browse files
authored
add notification.yml
add notification workflow
1 parent a903dac commit b8cee06

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/notification.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Push Notification"
2+
on: [push, pull_request, create]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: irc push
8+
uses: rectalogic/notify-irc@v1
9+
if: github.event_name == 'push'
10+
with:
11+
channel: ${{ secrets.LIBERA_CHATBOT_CHANNEL }}
12+
server: "irc.libera.chat"
13+
nickname: ${{ secrets.LIBERA_CHATBOT_USERNAME }}
14+
sasl_password: ${{ secrets.LIBERA_CHATBOT_PASSWORD }}
15+
message: |
16+
${{ github.actor }} pushed ${{ github.event.ref }} ${{ github.event.compare }}
17+
- name: irc pull request
18+
uses: rectalogic/notify-irc@v1
19+
if: github.event_name == 'pull_request'
20+
with:
21+
channel: ${{ secrets.LIBERA_CHATBOT_CHANNEL }}
22+
server: "irc.libera.chat"
23+
nickname: ${{ secrets.LIBERA_CHATBOT_USERNAME }}
24+
sasl_password: ${{ secrets.LIBERA_CHATBOT_PASSWORD }}
25+
message: |
26+
${{ github.actor }} opened PR ${{ github.event.pull_request.html_url }}
27+
- name: irc tag created
28+
uses: rectalogic/notify-irc@v1
29+
if: github.event_name == 'create' && github.event.ref_type == 'tag'
30+
with:
31+
channel: ${{ secrets.LIBERA_CHATBOT_CHANNEL }}
32+
server: "irc.libera.chat"
33+
nickname: ${{ secrets.LIBERA_CHATBOT_USERNAME }}
34+
sasl_password: ${{ secrets.LIBERA_CHATBOT_PASSWORD }}
35+
message: |
36+
${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }}

0 commit comments

Comments
 (0)