GitHub Agentic Workflows

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.

To select Gemini CLI as the AI engine, with inference hosted and billed through a Google subscription, add this to the workflow frontmatter:

engine: gemini

To authenticate, either:

  1. Provide GEMINI_API_KEY as a GitHub Actions repository secret, or

  2. configure keyless Google Workload Identity Federation.

.github/workflows/daily-status.md
---
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 items

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.