Files
bot-agents/action.yml
T
temeddix a2bc4c9541 Model input (#6)
Optional `model` input. Defaults move to the mid tiers, `claude-sonnet-5` and `gpt-5.6-terra`, since a run follows a fixed template plus the project's checks; a workflow can still pass a bigger model.

Reviewed-on: #6
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 16:48:13 +00:00

56 lines
2.0 KiB
YAML

name: Bot agents
description: Run a coding agent for approved Gitea issue/PR automation
inputs:
bot-type:
description: Which bot to run, either `codex` or `claude`
required: true
author-token:
description: >-
Gitea token of the account that commits, pushes, and opens pull requests,
with the `read:user`, `write:issue`, and `write:repository` scopes. The
agent sees it as `GITEA_TOKEN`.
required: true
reviewer-token:
description: >-
Gitea token of the bot account that posts comments and pull request
reviews, with the `write:issue` and `write:repository` scopes. Never
exposed to the agent, so it must differ from the author.
required: true
bot-token:
description: API key or token for the selected bot
required: false
model:
description: >-
Model for the selected bot. Defaults to `claude-sonnet-5` or
`gpt-5.6-terra`, the mid tiers, which cover reviews and fixes.
required: false
runs:
using: composite
steps:
# The agent works on the event's commit with full history, as the author.
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ inputs.author-token }}
# This step assumes this is `node:24-bookworm` container.
- name: Install dependencies
shell: bash
run: npm install -g @openai/codex @anthropic-ai/claude-code deno
- name: Run bot
shell: bash
run: deno run -A "${ACTION_PATH}/run.ts"
env:
ACTION_PATH: ${{ gitea.action_path }}
BOT_TYPE: ${{ inputs.bot-type }}
BOT_TOKEN: ${{ inputs.bot-token }}
MODEL: ${{ inputs.model }}
GITEA_API_URL: ${{ gitea.api_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_TOKEN: ${{ inputs.author-token }}
REVIEWER_TOKEN: ${{ inputs.reviewer-token }}
EVENT_NAME: ${{ gitea.event_name }}
ISSUE_INDEX: ${{ gitea.event.issue.number || gitea.event.pull_request.number }}
COMMENT: ${{ toJSON(gitea.event.comment || gitea.event.review) }}