Files
openclaw/.github/actions/discord-notify/action.yml
quotentiroler 6035bbcd2c feat(ci): implement staged branch promotion workflow
- Add testing-strategy.yml that calls existing ci.yml + adds macOS/smoke for stable
- Add promote-branch.yml for develop  alpha  beta  main promotion PRs
- Add deployment-strategy.yml for npm (alpha/beta/latest) + Docker (GHCR)
- Add release-orchestrator.yml to coordinate version  changelog  test  deploy
- Add version-operations.yml for YYYY.M.D versioning with prerelease suffixes
- Add generate-changelog.yml for conventional commit parsing
- Add release.yml manual trigger workflow
- Add discord-notify composite action for notifications
- Modify ci.yml to support workflow_call for reuse by testing-strategy
2026-02-07 09:02:48 -08:00

67 lines
1.7 KiB
YAML

name: Discord Notify
description: Send notifications to Discord webhook
inputs:
webhook_url:
description: Discord webhook URL
required: true
title:
description: Notification title
required: true
description:
description: Notification description
required: true
color:
description: Embed color (decimal)
required: false
default: '3447003'
username:
description: Bot username
required: false
default: 'OpenClaw CI'
avatar_url:
description: Bot avatar URL
required: false
default: 'https://avatars.githubusercontent.com/u/182880377'
timestamp:
description: Include timestamp
required: false
default: 'true'
fields:
description: JSON array of embed fields
required: false
default: '[]'
runs:
using: composite
steps:
- name: Send Discord notification
shell: bash
run: |
TIMESTAMP=""
if [ "${{ inputs.timestamp }}" = "true" ]; then
TIMESTAMP="\"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\","
fi
# Escape description for JSON
DESCRIPTION=$(echo '${{ inputs.description }}' | jq -Rs .)
PAYLOAD=$(cat <<EOF
{
"username": "${{ inputs.username }}",
"avatar_url": "${{ inputs.avatar_url }}",
"embeds": [{
"title": "${{ inputs.title }}",
"description": $DESCRIPTION,
"color": ${{ inputs.color }},
$TIMESTAMP
"fields": ${{ inputs.fields }}
}]
}
EOF
)
curl -H "Content-Type: application/json" \
-d "$PAYLOAD" \
"${{ inputs.webhook_url }}"