update
All checks were successful
Backend EC - Modal Deployment / build-and-push (push) Successful in 8m4s
Backend EC - Modal Deployment / notify-deploy (push) Successful in 3s

This commit is contained in:
DatTT127
2026-07-20 00:26:16 +07:00
parent d3d91998ab
commit 64284a229f
3 changed files with 78 additions and 6 deletions

View File

@@ -105,11 +105,8 @@ jobs:
DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }}
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
run: |
echo "check the webhook URL ${{ secrets.DEPLOY_WEBHOOK_URL }}" | base64
cat <<EOF | curl -X POST "${DEPLOY_WEBHOOK_URL}" \
-H "Content-Type: application/json" \
-H "X-Gitea-Signature: sha256=$(echo -n '@-' | openssl dgst -sha256 -hmac "${WEBHOOK_SECRET}" | cut -d' ' -f2)" \
-d @-
PAYLOAD=$(mktemp)
cat > "$PAYLOAD" <<EOF
{
"service": "cv-inference-server",
"image": "${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ steps.tag.outputs.tag }}",
@@ -122,4 +119,11 @@ jobs:
"ECR_PUBLIC_REGISTRY_ALIAS": "${{ vars.ECR_PUBLIC_REGISTRY_ALIAS }}"
}
}
EOF
EOF
SIG="sha256=$(openssl dgst -sha256 -hmac "${WEBHOOK_SECRET}" "$PAYLOAD" | cut -d' ' -f2)"
echo "check the webhook URL ${DEPLOY_WEBHOOK_URL}" | base64
curl -X POST "${DEPLOY_WEBHOOK_URL}" \
-H "Content-Type: application/json" \
-H "X-Gitea-Signature: ${SIG}" \
--data-binary "@${PAYLOAD}"
rm -f "$PAYLOAD"