|
| 1 | +name: Cata Agent Dispatch |
| 2 | +on: |
| 3 | + repository_dispatch: |
| 4 | + types: [octi-pulpo-dispatch] |
| 5 | + |
| 6 | +jobs: |
| 7 | + cata-agent: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + if: | |
| 10 | + github.event.client_payload.type == 'evolve' || |
| 11 | + github.event.client_payload.type == 'code-gen' || |
| 12 | + github.event.client_payload.type == 'bugfix' || |
| 13 | + github.event.client_payload.type == 'config' |
| 14 | + env: |
| 15 | + TASK_ID: ${{ github.event.client_payload.task_id }} |
| 16 | + TASK_TYPE: ${{ github.event.client_payload.type }} |
| 17 | + TASK_PRIORITY: ${{ github.event.client_payload.priority }} |
| 18 | + TASK_PROMPT: ${{ github.event.client_payload.prompt }} |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Download Cata binary |
| 23 | + env: |
| 24 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 25 | + run: | |
| 26 | + echo "Task ID: ${TASK_ID}" |
| 27 | + echo "Type: ${TASK_TYPE}" |
| 28 | + echo "Priority: ${TASK_PRIORITY}" |
| 29 | + gh release download --repo AgentGuardHQ/cata \ |
| 30 | + --pattern "cata-linux-amd64" \ |
| 31 | + --output cata \ |
| 32 | + --clobber || echo "WARN: cata release not yet published" |
| 33 | + chmod +x cata 2>/dev/null || true |
| 34 | +
|
| 35 | + - name: Configure git identity |
| 36 | + run: | |
| 37 | + git config --global user.email "octi-pulpo@agentguardhq.com" |
| 38 | + git config --global user.name "Octi Pulpo Bot" |
| 39 | +
|
| 40 | + - name: Run Cata agent |
| 41 | + env: |
| 42 | + DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} |
| 43 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + run: | |
| 45 | + if [ ! -f ./cata ]; then |
| 46 | + echo "ERROR: cata binary not available" |
| 47 | + exit 1 |
| 48 | + fi |
| 49 | + ./cata run \ |
| 50 | + --provider deepseek \ |
| 51 | + --model deepseek-chat \ |
| 52 | + --max-turns 100 \ |
| 53 | + "${TASK_PROMPT}" \ |
| 54 | + || echo "WARN: cata exited non-zero for task ${TASK_ID}" |
| 55 | +
|
| 56 | + - name: Report outcome |
| 57 | + if: always() |
| 58 | + run: echo "Task ${TASK_ID} dispatch complete. Status: ${{ job.status }}" |
0 commit comments