CI: Call benchmarks webhook with curl instead of a dedicated action

The workflow-webhook action that was being used didn't work on macOS or
machines without Docker, so let's create the payload ourselves, sign it
and send it over using plain old `curl`.
This commit is contained in:
Jelle Raaijmakers 2025-04-14 12:53:34 +02:00
parent 458c96727c
commit 4600f9a5b0
Notes: github-actions[bot] 2025-04-14 12:17:57 +00:00

View file

@ -62,7 +62,16 @@ jobs:
retention-days: 90
- name: 'Call webhook'
uses: distributhor/workflow-webhook@v3
with:
webhook_url: ${{ secrets.JS_BENCHMARKS_WEBHOOK_URL }}
webhook_secret: ${{ secrets.JS_BENCHMARKS_WEBHOOK_SECRET }}
shell: bash
run: |
echo -n '{ \
"commit": "${{ github.sha }}", \
}' > request.json
curl \
--fail \
--silent \
--show-error \
--header 'Content-Type: application/json' \
--header "X-Hub-Signature-256: sha256=$(openssl dgst -sha256 -hmac '${{ secrets.JS_BENCHMARKS_WEBHOOK_SECRET }}' request.json)" \
--data-binary '@request.json' \
'${{ secrets.JS_BENCHMARKS_WEBHOOK_URL }}'