Update python-app.yml #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
process_pr_events: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract event details | |
run: echo "EVENT_PAYLOAD=$(jq -c . < $GITHUB_EVENT_PATH)" >> $GITHUB_ENV | |
- name: Call External API (with HMAC signature) | |
env: | |
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} | |
run: | | |
SIGNATURE=$(echo -n "$EVENT_PAYLOAD" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | cut -d " " -f2) | |
curl -X POST https://your-webhook-url/github-webhook \ | |
-H "Content-Type: application/json" \ | |
-H "X-Hub-Signature-256: sha256=$SIGNATURE" \ | |
-d "$EVENT_PAYLOAD" |