diff --git a/.github/workflows/platform-api-cloud-release.yml b/.github/workflows/platform-api-cloud-release.yml index c19d4f2eb0..8dbe5ec380 100644 --- a/.github/workflows/platform-api-cloud-release.yml +++ b/.github/workflows/platform-api-cloud-release.yml @@ -67,13 +67,13 @@ jobs: echo "Payload:"; cat payload.json - # Azure verifies HMAC-SHA1(secret, body) against the X-Hub-Signature header, - # formatted as "sha1=". - SIG="sha1=$(openssl dgst -sha1 -hmac "$AZURE_WEBHOOK_SECRET" payload.json | awk '{print $NF}')" + # Azure verifies HMAC-SHA1(secret, body) against the x-webhook-checksum + # header. The value is the bare hex digest (no "sha1=" prefix). + CHECKSUM="$(openssl dgst -sha1 -hmac "$AZURE_WEBHOOK_SECRET" payload.json | awk '{print $NF}')" HTTP_CODE=$(curl -sS --connect-timeout 10 --max-time 60 -o response.txt -w '%{http_code}' -X POST "$AZURE_WEBHOOK_URL" \ -H "Content-Type: application/json" \ - -H "X-Hub-Signature: $SIG" \ + -H "x-webhook-checksum: $CHECKSUM" \ --data-binary @payload.json) echo "Azure webhook responded with HTTP ${HTTP_CODE}"