From 851de4cc2b48861b835327d005000c7d0c81d11b Mon Sep 17 00:00:00 2001 From: RogerZhongAWS <100961047+RogerZhongAWS@users.noreply.github.com> Date: Fri, 27 Jan 2023 00:33:36 +0000 Subject: [PATCH] Create notification.yml (#119) --- .github/workflows/notification.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/notification.yml diff --git a/.github/workflows/notification.yml b/.github/workflows/notification.yml new file mode 100644 index 0000000..67f773c --- /dev/null +++ b/.github/workflows/notification.yml @@ -0,0 +1,26 @@ +name: GitHub Issue notifications + +on: [issue_comment,issues] + +env: + ACTION_NAME: ${{ github.event.action }} + EVENT_NAME: ${{ github.event_name }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + ISSUE_TITLE: ${{ github.event.issue.title }} + + +jobs: + issue-notification: + runs-on: ubuntu-latest + steps: + - name: Send notifications on Slack + uses: slackapi/slack-github-action@v1.19.0 + with: + payload: | + { + "action": "${{env.ACTION_NAME}}", + "eventName": "${{env.EVENT_NAME}}", + "issueNumber": "${{env.ISSUE_NUMBER}}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}