mirror of
https://github.com/1c7/chinese-independent-developer.git
synced 2026-08-16 18:13:28 +08:00
23 lines
663 B
YAML
23 lines
663 B
YAML
name: 触发 Claude Routine
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 */6 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
trigger:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 触发 Claude Routine
|
|
run: |
|
|
response=$(curl -s -X POST "https://api.anthropic.com/v1/claude_code/routines/trig_01QqQ9rpKCEVLB5R78v83umP/fire" \
|
|
-H "Authorization: Bearer ${{ secrets.CLAUDE_ROUTINE_TOKEN }}" \
|
|
-H "anthropic-version: 2023-06-01" \
|
|
-H "Content-Type: application/json")
|
|
echo "$response"
|
|
if echo "$response" | grep -q '"type":"error"'; then
|
|
echo "API returned an error"
|
|
exit 1
|
|
fi
|