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