-
Notifications
You must be signed in to change notification settings - Fork 17
44 lines (41 loc) · 1.25 KB
/
send_slack_msg.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Send Slack Msg
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
pr_send_slack_msg:
name: send slack message for PR
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: send PR to slack workflow
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"event_name": "${{ github.event_name }}",
"event_html_url": "${{ github.event.pull_request.html_url }}",
"repo_name": "${{ github.event.repository.name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SEND_MSG}}
issue_send_slack_msg:
name: send slack message for issue
if: github.event_name == 'issues'
runs-on: ubuntu-latest
steps:
- name: send issue to slack workflow
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"event_name": "${{ github.event_name }}",
"event_html_url": "${{ github.event.issue.html_url }}",
"repo_name": "${{ github.event.repository.name }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SEND_MSG }}