Skip to content

Diff headers

Diff headers #72

Workflow file for this run

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}](${URL})"
curl ${DIFF_BOT_NOTIFICATION_URL} \
-H 'Content-Type: application/json' \
-d "
{
\"msgtype\": \"markdown\",
\"markdown\": {
\"content\": \"${MESSAGE}\"
}
}"