-
Notifications
You must be signed in to change notification settings - Fork 50
39 lines (38 loc) · 1.54 KB
/
notify.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
name: Notify
on:
pull_request:
types: [opened]
issues:
types: [opened]
pull_request_comment:
jobs:
integration_test_incoming_webhook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- run: echo "${{ github.event_name }}"
- name: Notify slack on pull request
if: ${{ github.event_name == 'pull_request' }}
id: slackIncoming
uses: ./
payload: "{\"text\":\"New pull request on repository ${{ github.repository }}: ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }}\"}"
env:
SLACK_WEBHOOK_URL: ${{ vars.SLACK_INCOMING_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Notify slack on issue
if: ${{ github.event_name == 'issues' }}
id: slackIncoming
uses: ./
payload: "{\"text\":\"New issue on repository ${{ github.repository }}: ${{ github.server_url }}/${{ github.repository }}/issues/${{ github.event.number }}\"}"
env:
SLACK_WEBHOOK_URL: ${{ vars.SLACK_INCOMING_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Notify slack on pull request comment
if: ${{ github.event_name == 'pull_request_comment' }}
id: slackIncoming
uses: ./
payload: "{\"text\":\"New comment on repository ${{ github.repository }}: ${{ github.server_url }}/${{ github.repository }}/issues/${{ github.event.number }}\"}"
env:
SLACK_WEBHOOK_URL: ${{ vars.SLACK_INCOMING_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK