-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.12 KB
/
diff_headers.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
name: Diff headers
on:
workflow_dispatch:
inputs:
base-version:
description: 'e.g., rtc_4.3.0'
type: 'string'
required: true
target-version:
description: 'e.g., rtc_4.3.1'
type: 'string'
required: true
jobs:
diff-headers:
runs-on: ubuntu-latest
env:
DIFF_BOT_NOTIFICATION_URL: ${{ secrets.DIFF_BOT_NOTIFICATION_URL }}
steps:
- uses: actions/checkout@v3
- name: Diff headers
run: |
bash scripts/diff.sh ${{ inputs.base-version }} ${{ inputs.target-version }}
shell: bash
- name: Notification
run: |
URL=https://github.com/AgoraIO-Extensions/terra_shared_configs/actions/runs/${{ github.run_id }}
MESSAGE="## Diff headers between ${{ inputs.base-version }} and ${{ inputs.target-version }}:\n${URL}"
curl ${DIFF_BOT_NOTIFICATION_URL} \
-H 'Content-Type: application/json' \
-d "
{
\"msgtype\": \"text\",
\"text\": {
\"content\": \"${MESSAGE}\"
}
}"