actions/ai-inference
An action for calling AI models with GitHub Models
What it solves
This project provides a GitHub Action that allows developers to integrate AI-powered inference directly into their CI/CD workflows. It eliminates the need to write custom scripts to call AI models, providing a standardized way to run prompts against the GitHub Copilot CLI.
How it works
The action acts as a wrapper around the GitHub Copilot CLI. It takes a prompt (provided inline or via a file) and a system prompt, sends them to the Copilot CLI, and returns the model's response as a workflow output or a temporary file.
Who it’s for
Developers and DevOps engineers who use GitHub Copilot and want to automate AI tasks—such as summarizing repository changes or analyzing code—within their GitHub Actions workflows.
Highlights
- Flexible Prompting: Supports inline prompts, plain text files, and structured
.prompt.ymlfiles with template variables. - Variable Injection: Allows injecting content from other files into prompts using the
file_inputparameter. - Model Selection: Enables specifying the model to be used (e.g.,
gpt-4.1,claude-sonnet-4.5). - Model Response Handling: Outputs the response as both a string and a path to a temporary file for easier processing in subsequent workflow steps.
Related
- Project
- Project
- Project
- Project
- Project