From e67f6bb29004328fda8975a93df33495defadbad Mon Sep 17 00:00:00 2001 From: Ollama Date: Tue, 21 Apr 2026 08:33:11 +0200 Subject: [PATCH] fix: Update deploy webhook to match Docker Hub payload format - Send payload matching Docker Hub webhook structure - Include push_data.tag and repository.repo_name fields - Token authentication via query string (?token=SECRET) - Add optional DOCKER_REPO_NAME secret for custom repo - Preserve GitHub deployment info in github_deployment field --- .github/workflows/deploy.yml | 47 +++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ac583d5f0..68e88d913 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -68,40 +68,59 @@ jobs: env: DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }} DEPLOY_WEBHOOK_TOKEN: ${{ secrets.DEPLOY_WEBHOOK_TOKEN }} + DOCKER_REPO_NAME: ${{ secrets.DOCKER_REPO_NAME }} run: | if [ -z "$DEPLOY_WEBHOOK_URL" ]; then echo "::warning::DEPLOY_WEBHOOK_URL secret is not configured" echo "Please add the DEPLOY_WEBHOOK_URL secret in your repository settings" - - # For testing: just succeed echo "status=success" >> $GITHUB_OUTPUT exit 0 fi - # Build the payload + IMAGE_TAG="${{ github.event.inputs.image_tag }}" + REPO_NAME="${DOCKER_REPO_NAME:-opensourcepos/opensourcepos}" + PUSHED_AT=$(date +%s) + + WEBHOOK_URL="$DEPLOY_WEBHOOK_URL" + if [ -n "$DEPLOY_WEBHOOK_TOKEN" ]; then + WEBHOOK_URL="${DEPLOY_WEBHOOK_URL}?token=${DEPLOY_WEBHOOK_TOKEN}" + fi + PAYLOAD=$(cat </dev/null || true