85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
name: "Kilo GitHub Action"
|
|
description: "Run Kilo AI agent in GitHub Actions workflows"
|
|
branding:
|
|
icon: "code"
|
|
color: "gray-dark"
|
|
|
|
inputs:
|
|
model:
|
|
description: "Model to use"
|
|
required: true
|
|
|
|
agent:
|
|
description: "Agent to use. Must be a primary agent. Falls back to default_agent from config or 'build' if not found."
|
|
required: false
|
|
|
|
share:
|
|
description: "Share the Kilo session (defaults to true for public repos)"
|
|
required: false
|
|
|
|
prompt:
|
|
description: "Custom prompt to override the default prompt"
|
|
required: false
|
|
|
|
use_github_token:
|
|
description: "Use GITHUB_TOKEN directly instead of Kilo App token exchange. When true, skips OIDC and uses the GITHUB_TOKEN env var."
|
|
required: false
|
|
default: "false"
|
|
|
|
mentions:
|
|
description: "Comma-separated list of trigger phrases (case-insensitive). Defaults to '/kilo,/kc'"
|
|
required: false
|
|
|
|
oidc_base_url:
|
|
description: "Base URL for OIDC token exchange API. Only required when running a custom GitHub App install. Defaults to https://api.kilo.ai"
|
|
required: false
|
|
|
|
kilo_api_key:
|
|
description: "Kilo API key for gateway authentication"
|
|
required: false
|
|
|
|
kilo_org_id:
|
|
description: "Kilo organization ID"
|
|
required: false
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Get Kilo version
|
|
id: version
|
|
shell: bash
|
|
run: |
|
|
VERSION=$(curl -sf https://api.github.com/repos/Kilo-Org/kilo/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4)
|
|
echo "version=${VERSION:-latest}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache Kilo
|
|
id: cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.kilo/bin
|
|
key: kilo-${{ runner.os }}-${{ runner.arch }}-${{ steps.version.outputs.version }}
|
|
|
|
- name: Install Kilo
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
run: curl -fsSL https://kilo.ai/cli/install | bash
|
|
|
|
- name: Add Kilo to PATH
|
|
shell: bash
|
|
run: echo "$HOME/.kilo/bin" >> $GITHUB_PATH
|
|
|
|
- name: Run Kilo
|
|
shell: bash
|
|
id: run_kilo
|
|
run: kilo github run
|
|
env:
|
|
MODEL: ${{ inputs.model }}
|
|
AGENT: ${{ inputs.agent }}
|
|
SHARE: ${{ inputs.share }}
|
|
PROMPT: ${{ inputs.prompt }}
|
|
USE_GITHUB_TOKEN: ${{ inputs.use_github_token }}
|
|
MENTIONS: ${{ inputs.mentions }}
|
|
OIDC_BASE_URL: ${{ inputs.oidc_base_url }}
|
|
KILO_API_KEY: ${{ inputs.kilo_api_key }}
|
|
KILO_ORG_ID: ${{ inputs.kilo_org_id }}
|