fix: add API key auth to Discord summary GitHub Action

This commit is contained in:
Ajax Davis 2026-01-13 05:31:37 +10:00
parent a3f1f3935e
commit 790a338f4d

View file

@ -20,13 +20,17 @@ jobs:
echo "Generated conversation ID: $CONV_ID"
- name: Trigger Discord Summary Agent
env:
TPMJS_API_KEY: ${{ secrets.TPMJS_API_KEY }}
run: |
echo "Triggering agent with conversation: ${{ steps.conv-id.outputs.conv_id }}"
# POST to the agent conversation endpoint
# Agent ID: Discord Daily Summary agent on tpmjs.com
# Requires API key with agent:chat scope
RESPONSE=$(curl -s -X POST \
"https://tpmjs.com/api/agents/cmk9utpvg0001kz04csbisvf5/conversation/${{ steps.conv-id.outputs.conv_id }}" \
-H "Authorization: Bearer $TPMJS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Read the Discord server (guild ID 1349727923434815519) for the past 24 hours, excluding bots. Then post a detailed summary with an embed to channel 1442666515425132644. Include key discussions, announcements, and any action items."