actions/ai-inference
An action for calling AI models with GitHub Models
解决的问题
该项目提供了一个 GitHub Action,允许开发者将 AI 驱动的推理直接集成到其 CI/CD 工作流中。无需编写自定义脚本来调用 AI 模型,提供了一种标准化的方式,通过 GitHub Copilot CLI 运行提示词。
工作原理
该动作作为 GitHub Copilot CLI 的封装器。它接收一个提示(以内联方式或通过文件提供)和一个系统提示,将其发送到 Copilot CLI,并将模型的响应作为工作流输出或临时文件返回。
适用人群
使用 GitHub Copilot 并希望在 GitHub Actions 工作流中自动化 AI 任务(如总结仓库变更或分析代码)的开发者和 DevOps 工程师。
主要亮点
- 灵活的提示输入:支持内联提示、纯文本文件和包含模板变量的结构化
.prompt.yml 文件。
- 变量注入:通过
file_input 参数,允许将其他文件的内容注入提示中。
- 模型选择:支持指定要使用的模型(例如
gpt-4.1、claude-sonnet-4.5)。
- 模型响应处理:将响应同时输出为字符串和临时文件路径,便于在后续工作流步骤中处理。
相关
- 项目
github/appGitHub Copilot 应用是一款桌面客户端,可让你在隔离的本地或云工作区中运行 Copilot 驱动的 AI 代理,管理多个并行会话,并通过可视化画布和自动化工具,从选择任务到合并 PR 的整个编码工作流。
- 项目
- 项目
github/gh-awGitHub Agentic Workflows (`gh-aw`) is a GitHub CLI extension that lets you write AI‑powered automation as Markdown files with YAML front‑matter. The tool compiles these *agentic* workflows into standard GitHub Actions workflows, running LLMs (Copilot, Claude, OpenAI, Gemini, Pi) in a sandboxed, read‑only mode. Writes are gated through a separate safe‑outputs job with scoped permissions. It’s designed for tasks like issue triage, PR review, CI failure analysis, docs updates, and repo reporting, integrating securely with existing CI/CD pipelines.
- 项目
- 项目