Add ordered bot profiles
Check / deno (pull_request) Successful in 49s

This commit is contained in:
Danny Kim
2026-09-23 20:41:18 +09:00
parent ba9e0c0787
commit e106d08bed
4 changed files with 390 additions and 77 deletions
+8 -14
View File
@@ -2,8 +2,13 @@ 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`
profiles:
description: >-
Ordered YAML sequence of bot profiles. Each profile has `type` (`claude`
or `codex`), an optional `model`, and a `token` containing a Claude setup
token or Codex API key. Codex may omit `token` to use its persisted
device login. A profile is tried only after the previous one exhausts
its usage allowance.
required: true
author-token:
description: >-
@@ -17,15 +22,6 @@ inputs:
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:
@@ -43,9 +39,7 @@ runs:
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 }}
PROFILES: ${{ inputs.profiles }}
GITEA_API_URL: ${{ gitea.api_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_TOKEN: ${{ inputs.author-token }}