Skip to content

Commit

Permalink
add workflow: send slack msg (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: Bossa Wong <[email protected]>
  • Loading branch information
Beaelf and Bossa573 committed Jul 26, 2022
1 parent abf69ac commit 204735e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/send_slack_msg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}

0 comments on commit 204735e

Please sign in to comment.