Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/workflows/AWESOME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Awesome Workflows

Welcome to our collection of awesome community-contributed workflows! This page showcases creative and powerful implementations of the [Google Gemini CLI GitHub Action](https://github.com/google-github-actions/run-gemini-cli) created by the community.

**Want to add your workflow?** Check out the [submission guidelines](./README.md#share-your-workflow) in our main README.

> **⚠️ Security Notice**: Always review and understand any workflow before using it in your repository. Community-contributed workflows are provided as-is and have not been security audited. Verify the code, permissions, and any external dependencies before implementation.

- [Awesome Workflows](#awesome-workflows)
- [Workflow Categories](#workflow-categories)
- [🔍 Code Quality](#-code-quality)
- [📋 Project Management](#-project-management)
- [Enforce Contribution Guidelines in Pull Requests](#enforce-contribution-guidelines-in-pull-requests)
- [📝 Documentation](#-documentation)
- [🛡️ Security](#️-security)
- [🧪 Testing](#-testing)
- [🚀 Deployment \& Release](#-deployment--release)
- [Generate Release Notes](#generate-release-notes)
- [🎯 Specialized Use Cases](#-specialized-use-cases)
- [Featured Workflows](#featured-workflows)

## Workflow Categories

Browse workflows by category to find exactly what you're looking for.

### 🔍 Code Quality

Workflows that help maintain code quality, perform analysis, or enforce standards.

*No workflows yet. Be the first to contribute!*

### 📋 Project Management

Workflows that help manage GitHub issues, projects, or team collaboration.

#### Enforce Contribution Guidelines in Pull Requests

**Repository:** [jasmeetsb/gemini-github-actions](https://github.com/jasmeetsb/gemini-github-actions)

**Description:** Automates validation of pull requests against your repository's CONTRIBUTING.md using the Google Gemini CLI. The workflow posts a single upserted PR comment indicating PASS/FAIL with a concise checklist of actionable items, and can optionally fail the job to enforce compliance.

**Key Features:**

- Reads and evaluates PR title, body, and diff against CONTRIBUTING.md
- Posts a single PR comment with a visible PASS/FAIL marker in Comment Title and details of compliance status in the comment body
- Optional enforcement: fail the workflow when violations are detected

**Setup Requirements:**

- Copy [.github/workflows/pr-contribution-guidelines-enforcement.yml](https://github.com/jasmeetsb/gemini-github-actions/blob/main/.github/workflows/pr-contribution-guidelines-enforcement.yml) to your .github/workflows/ folder.
- File: `CONTRIBUTING.md` at the repository root
- (Optional) Repository variable `FAIL_ON_GUIDELINE_VIOLATIONS=true` to fail the workflow on violations

**Example Usage:**

- Define contribution guidelines in CONTRIBUTING.md file
- Open a new PR or update an existing PR, which would then trigger the workflow
- Workflow will validate the PR against the contribution guidelines and add a comment in the PR with PASS/FAIL status and details of guideline compliance and non-compliance

**OR**

- Add following comment in an existing PR **"/validate-contribution"** to trigger the workflow

**Workflow File:**

- Example location in this repo: [.github/workflows/pr-contribution-guidelines-enforcement.yml](https://github.com/jasmeetsb/gemini-github-actions/blob/main/.github/workflows/pr-contribution-guidelines-enforcement.yml)
- Typical usage in a consumer repo: `.github/workflows/pr-contribution-guidelines-enforcement.yml` (copy the file and adjust settings/secrets as needed)

### 📝 Documentation

Workflows that generate, update, or maintain documentation automatically.

*No workflows yet. Be the first to contribute!*

### 🛡️ Security

Workflows focused on security analysis, vulnerability detection, or compliance.

*No workflows yet. Be the first to contribute!*

### 🧪 Testing

Workflows that enhance testing processes, generate test cases, or analyze test results.

*No workflows yet. Be the first to contribute!*

### 🚀 Deployment & Release

Workflows that handle deployment, release management, or publishing tasks.

#### Generate Release Notes

**Repository:** [conforma/policy](https://github.com/conforma/policy)

Make release notes based on all notable changes since a given tag.
It categorizes the release notes nicely with emojis, output as Markdown.

**Key Features:**
- Categorize changes in release notes
- Include relevant links in release notes
- Add fun emojis in release notes

**Workflow File:** [View on GitHub](https://github.com/conforma/policy/blob/bba371ad8f0fff7eea2ce7a50539cde658645a56/.github/workflows/release.yaml#L93-L114)

### 🎯 Specialized Use Cases

Unique or domain-specific workflows that showcase creative uses of Gemini CLI.

*No workflows yet. Be the first to contribute!*

## Featured Workflows

*Coming soon!* This section will highlight particularly innovative or popular community workflows.

---

*Want to see your workflow featured here? Check out our [submission guidelines](./README.md#share-your-workflow)!*
119 changes: 119 additions & 0 deletions .github/workflows/CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Configuring Gemini CLI Workflows

This guide covers how to customize and configure Gemini CLI workflows to meet your specific needs.

- [Configuring Gemini CLI Workflows](#configuring-gemini-cli-workflows)
- [How to Configure Gemini CLI](#how-to-configure-gemini-cli)
- [Key Settings](#key-settings)
- [Conversation Length (`maxSessionTurns`)](#conversation-length-maxsessionturns)
- [Allowlist Tools (`coreTools`)](#allowlist-tools-coretools)
- [MCP Servers (`mcpServers`)](#mcp-servers-mcpservers)
- [Custom Context and Guidance (`GEMINI.md`)](#custom-context-and-guidance-geminimd)
- [GitHub Actions Workflow Settings](#github-actions-workflow-settings)
- [Setting Timeouts](#setting-timeouts)
- [Required Permissions](#required-permissions)

## How to Configure Gemini CLI

Gemini CLI workflows are highly configurable. You can adjust their behavior by editing the corresponding `.yml` files in your repository.

Gemini CLI supports many settings that control how it operates. For a complete list, see the [Gemini CLI documentation](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#available-settings-in-settingsjson).

### Key Settings

#### Conversation Length (`maxSessionTurns`)

This setting controls the maximum number of conversational turns (messages exchanged) allowed during a workflow run.

**Default values by workflow:**

| Workflow | Default `maxSessionTurns` |
| ------------------------------------ | ------------------------- |
| [Issue Triage](./issue-triage) | 25 |
| [Pull Request Review](./pr-review) | 20 |
| [Gemini CLI Assistant](./gemini-cli) | 50 |

**How to override:**

Add the following to your workflow YAML file to set a custom value:

```yaml
with:
settings: |-
{
"maxSessionTurns": 10
}
```

#### Allowlist Tools (`coreTools`)

Allows you to specify a list of [built-in tools] that should be made available to the model. You can also use this to allowlist commands for shell tool.

**Default:** All tools available for use by Gemini CLI.

**How to configure:**

Add the following to your workflow YAML file to specify core tools:

```yaml
with:
settings: |-
{
"coreTools": [
"read_file"
"run_shell_command(echo)",
"run_shell_command(gh label list)"
]
}
```

#### MCP Servers (`mcpServers`)

Configures connections to one or more Model Context Protocol (MCP) servers for discovering and using custom tools. This allows you to extend Gemini CLI GitHub Action with additional capabilities.

**Default:** Empty

**Example:**

```yaml
with:
settings: |-
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
```

### Custom Context and Guidance (`GEMINI.md`)

To provide Gemini CLI with custom instructions—such as coding conventions, architectural patterns, or other guidance—add a `GEMINI.md` file to the root of your repository. Gemini CLI will use the content of this file to inform its responses.

## GitHub Actions Workflow Settings

### Setting Timeouts

You can control how long Gemini CLI runs by using either the `timeout-minutes` field in your workflow YAML, or by specifying a timeout in the `settings` input.

### Required Permissions

Only users with the following roles can trigger the workflow:

- Repository Owner (`OWNER`)
- Repository Member (`MEMBER`)
- Repository Collaborator (`COLLABORATOR`)

[built-in tools]: https://github.com/google-gemini/gemini-cli/blob/main/docs/core/tools-api.md#built-in-tools
87 changes: 87 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Gemini CLI Workflows

This directory contains a collection of example workflows that demonstrate how to use the [Google Gemini CLI GitHub Action](https://github.com/google-github-actions/run-gemini-cli). These workflows are designed to be reusable and customizable for your own projects.

- [Gemini CLI Workflows](#gemini-cli-workflows)
- [Available Workflows](#available-workflows)
- [Setup](#setup)
- [Customizing Workflows](#customizing-workflows)
- [Awesome Workflows](#awesome-workflows)
- [Share Your Workflow](#share-your-workflow)

## Available Workflows

* **[Gemini Dispatch](./gemini-dispatch)**: A central dispatcher that routes requests to the appropriate workflow based on the triggering event and the command provided in the comment.
* **[Issue Triage](./issue-triage)**: Automatically triage GitHub issues using Gemini. This workflow can be configured to run on a schedule or be triggered by issue events.
* **[Pull Request Review](./pr-review)**: Automatically review pull requests using Gemini. This workflow can be triggered by pull request events and provides a comprehensive review of the changes.
* **[Gemini CLI Assistant](./gemini-assistant)**: A general-purpose, conversational AI assistant that can be invoked within pull requests and issues to perform a wide range of tasks.

## Setup

For detailed setup instructions, including prerequisites and authentication, please refer to the main [Authentication documentation](../../docs/authentication.md).

To use a workflow, you can utilize either of the following steps:
- Run the `/setup-github` command in Gemini CLI on your terminal to set up workflows for your repository.
- Copy the workflow files into your repository's `.github/workflows` directory.

## Customizing Workflows

Gemini CLI workflows are highly configurable. You can adjust their behavior by editing the corresponding `.yml` files in your repository.

For detailed configuration options, including Gemini CLI settings, timeouts, and permissions, see our [Configuration Guide](./CONFIGURATION.md).

## Awesome Workflows

Discover awesome workflows created by the community! These are publicly available workflows that showcase creative and powerful uses of the Gemini CLI GitHub Action.

👉 **[View all Awesome Workflows](./AWESOME.md)**

### Share Your Workflow

Have you created an awesome workflow using Gemini CLI? We'd love to feature it in our [Awesome Workflows](./AWESOME.md) page!

**Submission Process:**
1. **Ensure your workflow is public** and well-documented
2. **Fork this repository** and create a new branch
3. **Add your workflow** to the appropriate category section in [AWESOME.md](./AWESOME.md) using the [workflow template](./AWESOME.md#workflow-template)
- If none of the existing categories fit your workflow, feel free to propose a new category
4. **Open a pull request** with your addition
5. **Include a brief summary** in your PR description of what your workflow does and why it's awesome

**What makes a workflow "awesome"?**
- Solves a real problem or provides significant value
- Is well-documented with clear setup instructions
- Follows best practices for security and performance
- Has been tested and is actively maintained
- Includes example configurations or use cases

**Note:** This process is specifically for sharing community workflows. We also recommend reading our [CONTRIBUTING.md](../../CONTRIBUTING.md) file for general contribution guidelines and best practices that apply to all pull requests.

**Workflow Template:**

When adding your workflow to [AWESOME.md](./AWESOME.md), use this format:

```markdown
#### <Workflow Name>

**Repository:** [<owner>/<repo>](https://github.com/<owner>/<repo>)

Brief description of what the workflow does and its key features.

**Key Features:**
- Feature 1
- Feature 2
- Feature 3

**Setup Requirements:**
- Requirement 1
- Requirement 2 (if any)

**Example Use Cases:**
- Use case 1
- Use case 2

**Workflow File:** [View on GitHub](https://github.com/<owner>/<repo>/blob/main/.github/workflows/<workflow-name>.yml)
```

Browse our [Awesome Workflows](./AWESOME.md) page to see what the community has created!
Loading