Introduction¶
When developing DSH agents, interacting with CI systems usually involves manually triggering workflows, querying statuses, and debugging logs. The ci-runner plugin integrates GitHub Actions (workflow_dispatch, check-run API) and local command pipelines into a unified interface, enabling log streaming, status tracking, and fault diagnosis report generation using DeepSeek.
What Is It¶
This is a DSH plugin maintained by JohnXu22786. It provides a set of tools for triggering GitHub Actions workflows or local test pipelines, streaming logs, and sending the tail of failing logs to DeepSeek to generate a Markdown report.
Installation and Configuration¶
Prerequisites¶
- Node.js >= 18.17
- DeepSeek Harness installed
- GitHub Token configured in the environment variable
GITHUB_TOKEN(requiresactions:writeoractions:readpermissions)
Installation¶
Install using the plugin package:
dsh plugin --profile demo add ./path/to/ci-runner
After installation, the plugin inserts the adapter entry point via cordis.patch.yml.
Configuration¶
Plugin configuration is usually set in profile/config.yml. The following are key configuration options:
ci-runner:
github:
defaultRepo: owner/repo
defaultBranch: main
apiBase: https://api.github.com
pollIntervalMs: 5000
pollTimeoutMs: 600000
diagnosis:
llm:
baseUrl: https://api.deepseek.com/v1
apiKey: sk-...
model: deepseek-chat
maxTailChars: 12000
Features and Tools¶
The plugin provides 5 core tools, all accessible via ctx.tools:
- ci_trigger: Triggers GitHub
workflow_dispatchor runs a local pipeline until completion. - ci_status: Queries run status (
queued/in_progress/completed) and conclusion. - ci_logs: Reads logs; logs are masked and truncated to the tail.
- ci_watch: Waits for run completion and includes the log tail on failure.
- ci_diagnose: End-to-end diagnosis. After triggering or waiting, sends the tail of failed logs to DeepSeek to generate a Markdown report containing the failure stage, error classification, root cause, remediation steps, and related files.
Security and Runtime¶
- Zero runtime dependencies: Depends only on
fetchandnode:child_process. - Credential handling: The GitHub Token is read only from environment variables, not persisted, and discarded after use at runtime.
- Log security: Returned logs and reports mask known secrets.
Use Cases¶
Suitable for DSH agent developers who need automated CI feedback, fault self-healing, or log analysis.
Summary¶
ci-runner integrates CI triggering, status querying, log viewing, and intelligent diagnosis into standard tools. It does not depend on a complex runtime environment and manages credentials through environment variables, making it suitable for integration into various automation workflows.
- GitHub repository: JohnXu22786/ci-runner
- Plugin directory: ci-runner - SkillHub