-
Notifications
You must be signed in to change notification settings - Fork 1.2k
41 lines (33 loc) · 1.03 KB
/
report-merged-pr.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
# Report PR merged event to Datadog
name: Report Merged PR
on:
pull_request:
branches:
- main
types: [closed]
permissions: {}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DD_API_KEY: ${{ secrets.REPORT_MERGED_PR_DD_API_KEY }}
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
persist-credentials: false
- name: Setup Python3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.12.6"
cache: "pip"
cache-dependency-path: '**/requirements*.txt'
- name: Install python dependencies
run: pip3 install -r requirements.txt
- name: Send merge event to Datadog
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
invoke -e github.pr-merge-dd-event-sender -p "$PR_NUMBER"