Skip to content

ci: add Grok Bot release notification workflow - #995

Open
johnleider wants to merge 1 commit into
masterfrom
cursor/grok-bot-release-notify-2454
Open

johnleider wants to merge 1 commit into
masterfrom
cursor/grok-bot-release-notify-2454

Conversation

@johnleider

Copy link
Copy Markdown
Member

Adds a GitHub Actions workflow that notifies Grok Bot when a release is published.

What this does

When a GitHub release is published, this workflow POSTs release metadata (tag, name, URL, prerelease status, body) to the Grok Bot webhook for the "Release → social draft" feature.

Implementation

  • Triggers on release: published events
  • Validates required secrets before proceeding
  • Constructs a minimal JSON payload from the GitHub event
  • Sends Authorization: Bearer header (not possible with native GitHub webhooks)

Secrets required

  • GROK_BOT_RELEASE_WEBHOOK_URL — already configured
  • GROK_BOT_RELEASE_WEBHOOK_KEY — already configured
Open in Web Open in Cursor 

Adds a GitHub Actions workflow that POSTs release metadata to the Grok Bot
webhook when a GitHub release is published. Uses repo secrets for webhook
URL and authorization key.

Co-authored-by: John Leider <johnleider@users.noreply.github.com>
Comment on lines +11 to +39
runs-on: ubuntu-latest
if: ${{ !github.event.release.draft }}
steps:
- name: POST to Grok Bot webhook
env:
WEBHOOK_URL: ${{ secrets.GROK_BOT_RELEASE_WEBHOOK_URL }}
WEBHOOK_KEY: ${{ secrets.GROK_BOT_RELEASE_WEBHOOK_KEY }}
EVENT_PATH: ${{ github.event_path }}
run: |
set -euo pipefail
if [ -z "${WEBHOOK_URL:-}" ] || [ -z "${WEBHOOK_KEY:-}" ]; then
echo "Missing GROK_BOT_RELEASE_WEBHOOK_URL or GROK_BOT_RELEASE_WEBHOOK_KEY"
exit 1
fi
payload=$(jq -c '{
source: "github-actions",
event: "release.published",
repository: .repository.full_name,
tag: .release.tag_name,
name: (.release.name // .release.tag_name),
html_url: .release.html_url,
prerelease: .release.prerelease,
draft: .release.draft,
body: (.release.body // "")
}' "$EVENT_PATH")
curl -fsS -X POST "$WEBHOOK_URL" \
-H "Authorization: Bearer $WEBHOOK_KEY" \
-H "Content-Type: application/json" \
-d "$payload"

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants