spawn/.github/workflows/discovery.yml
B 1029320cff refactor: Rename improve to discovery and remove improve CLI command
Rename the GitHub workflow, scripts, and service from "improve" to
"discovery" to better reflect what the automation does. Remove the
`spawn improve` CLI command entirely — the discovery/refactor loops
are internal automation, not user-facing CLI features.

File renames:
- .github/workflows/improve.yml → discovery.yml
- .claude/skills/.../improve.sh → discovery.sh
- .claude/skills/.../start-improve.sh → start-discovery.sh
- Service: improve-trigger → discovery-trigger

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 16:13:56 +00:00

34 lines
998 B
YAML

name: Trigger Discovery
on:
schedule:
- cron: '*/30 * * * *'
issues:
types: [opened, reopened]
workflow_dispatch:
concurrency:
group: discovery-sprite-trigger
cancel-in-progress: false
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger discovery sprite
env:
SPRITE_URL: ${{ secrets.DISCOVERY_SPRITE_URL }}
TRIGGER_SECRET: ${{ secrets.DISCOVERY_TRIGGER_SECRET }}
run: |
HTTP_CODE=$(curl -s -o /tmp/response.json -w '%{http_code}' -X POST \
"${SPRITE_URL}/trigger?reason=${{ github.event_name }}" \
-H "Authorization: Bearer ${TRIGGER_SECRET}")
cat /tmp/response.json
if [ "$HTTP_CODE" = "429" ]; then
echo "Cycle already running, skipping"
elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
echo "Triggered successfully"
else
echo "Failed with HTTP $HTTP_CODE"
exit 1
fi