Using Gemini CLI with GitHub Agentic Workflows
Google Gemini CLI is a coding agent from Google. GitHub Agentic Workflows runs Gemini CLI in GitHub Actions, adding GitHub event triggers, sandbox controls, and safe outputs for constrained, reviewable automation.
Selecting Gemini CLI as the AI engine
Section titled “Selecting Gemini CLI as the AI engine”To select Gemini CLI as the AI engine, with inference hosted and billed through a Google subscription, add this to the workflow frontmatter:
engine: geminiTo authenticate, either:
-
Provide
GEMINI_API_KEYas a GitHub Actions repository secret, or -
configure keyless Google Workload Identity Federation.
Example: scheduled repository report
Section titled “Example: scheduled repository report”---on: schedule: daily
permissions: contents: read issues: read pull-requests: read
engine: gemini
safe-outputs: create-issue: title-prefix: "[status] " labels: [report] close-older-issues: true---
# Daily Repository Status
Analyze the repository and create a concise daily status report covering:- Open issues and their priority- Recent PR activity- Upcoming work itemsCapabilities and limitations
Section titled “Capabilities and limitations”Gemini supports top-level max-turns, custom API targets, and per-command bash allowlisting. Gemini does not provide native tools.web-search; configure an MCP search integration when needed. It also does not support bare mode, max-continuations, native engine.agent selection, or custom engine.harness scripts. See the AI engine feature comparison.
GitHub Agentic Workflows vs. running Gemini directly in Actions
Section titled “GitHub Agentic Workflows vs. running Gemini directly in Actions”Running coding agent CLIs such as gemini directly in GitHub Actions without an adequate security architecture is not recommended. GitHub Agentic Workflows gives an appropriate security architecture and workflow portability across AI engines.