update
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user