Skip to content

Comments

feat: add agentic-cli-runner composite action (SC-18802)#13

Closed
richard-webb-dev wants to merge 1 commit intomainfrom
feat/add-agentic-cli-runner
Closed

feat: add agentic-cli-runner composite action (SC-18802)#13
richard-webb-dev wants to merge 1 commit intomainfrom
feat/add-agentic-cli-runner

Conversation

@richard-webb-dev
Copy link

@richard-webb-dev richard-webb-dev commented Feb 20, 2026

Summary

Adds a new reusable composite action agentic-cli-runner that runs OpenCode in non-interactive headless mode. This is a provider-agnostic action for AI-powered CI workflows, available to all repos in the simpleclub org.

Usage

- uses: simpleclub/.github/actions/agentic-cli-runner@main
  with:
    prompt: 'Your prompt here'
    agent_api_key: ${{ secrets.GEMINI_API_KEY }}
    agent_model: 'google/gemini-3-flash-preview'

This supersedes the PR in backend implementing it:
https://github.com/simpleclub/backend/pull/5534

I will close that one, and instead reference this repo instead.

Key Features

  • Provider-agnostic — works with Google, Anthropic, OpenAI, OpenRouter, and 70+ others via provider/model string
  • Single API key inputagent_api_key is applied to all common provider env vars; only the active provider uses it
  • Retry logic — configurable max_attempts
  • Metadata collection — processes .ai-metadata/*.json and *.md files created by the agent into a consolidated metadata output
  • Artifacts — uploads metadata files, conversation history, and (on failure) zipped OpenCode logs
  • CI-optimised — disables autoupdate, LSP download, and terminal title for lean execution

Testing

Tested locally with nektos/act using google/gemini-2.5-flash. OpenCode successfully answered a codebase question, created both expected metadata files, and the metadata was correctly extracted into the output.

example run:
https://github.com/simpleclub-extended/backend/actions/runs/22202068524

Files

actions/agentic-cli-runner/
  action.yml   — composite action definition (613 lines)
  README.md    — usage docs

Adds a provider-agnostic composite action that runs OpenCode (opencode.ai)
in non-interactive headless mode for use in AI-powered CI workflows.

- Supports any provider/model string (Google, Anthropic, OpenAI, OpenRouter, etc.)
- Single agent_api_key input applied to all common provider env vars
- Retry logic with configurable max_attempts
- Metadata collection from .ai-metadata/ directory (JSON + Markdown)
- Artifacts: metadata files, conversation history, error reports on failure
- CI-optimised: disables autoupdate, LSP download, terminal title

Tested with google/gemini-2.5-flash via nektos/act.
@CLAassistant
Copy link

CLAassistant commented Feb 20, 2026

CLA assistant check
All committers have signed the CLA.

@richard-webb-dev richard-webb-dev changed the title feat: add agentic-cli-runner composite action feat: add agentic-cli-runner composite action (SC-18802) Feb 20, 2026
@richard-webb-dev
Copy link
Author

Closing in favour of simpleclub/.github-private — action will be hosted there instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants