Skip to content

Commit c690a97

Browse files
committed
add slack notif
1 parent 3442747 commit c690a97

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#https://docs.github.com/en/webhooks/webhook-events-and-payloads#push
2+
name: notify-push
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
if: github.event.pusher.name == 'bigorn0'
11+
env:
12+
AUTHOR: ${{ github.event.pusher.name }}
13+
steps:
14+
- name: notify
15+
run: echo "${AUTHOR}"
16+
- name: notify slack
17+
id: slack
18+
uses: slackapi/slack-github-action@v1.26.0
19+
with:
20+
channel-id: 'develop-direct-pushes'
21+
payload: |
22+
{
23+
"text": " ${{ github.event.head_commit.url }}",
24+
"blocks": [
25+
{
26+
"type": "section",
27+
"text": {
28+
"type": "mrkdwn",
29+
"text": "Direct push to develop: ${{ github.event.head_commit.url }}"
30+
}
31+
}
32+
]
33+
}
34+
env:
35+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)