-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (27 loc) · 1.08 KB
/
deno.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
name: Pull Request and Push Handler
on:
pull_request:
branches: [ '*' ]
push:
branches: [ '*' ]
jobs:
handle_webhook:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get commit author for Push
if: github.event_name == 'push'
run: echo "COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an')" >> $GITHUB_ENV
- name: Webhook for PR
if: github.event_name == 'pull_request'
uses: distributhor/[email protected]
with:
webhook_url: "https://hook.eu2.make.com/c98145z4s5jbpw906x26s15zobhpko07"
data: '{"url": "${{ github.event.pull_request.html_url }}", "author": "${{ github.event.pull_request.user.login }}"}'
- name: Webhook for Push with commit author
if: github.event_name == 'push'
uses: distributhor/[email protected]
with:
webhook_url: "https://hook.eu2.make.com/c98145z4s5jbpw906x26s15zobhpko07"
data: '{"url": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}", "author": "${{ env.COMMIT_AUTHOR }}"}'