A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/google-github-actions/run-gemini-cli below:

google-github-actions/run-gemini-cli: A GitHub Action invoking the Gemini CLI.

run-gemini-cli is a GitHub Action that integrates Gemini into your development workflow via the Gemini CLI. It acts both as an autonomous agent for critical routine coding tasks, and an on-demand collaborator you can quickly delegate work to.

Use it to perform GitHub pull request reviews, triage issues, perform code analysis and modification, and more using Gemini conversationally (e.g., @gemini-cli fix this issue) directly inside your GitHub repositories.

Get started with Gemini CLI in your repository in just a few minutes:

Obtain your API key from Google AI Studio with generous free-of-charge quotas

2. Add it as a GitHub Secret

Store your API key as a secret named GEMINI_API_KEY in your repository:

You have two options to set up a workflow:

Option A: Use setup command (Recommended)

  1. Start the Gemini CLI:

  2. In the chat interface, type:

Option B: Manually copy workflows

  1. Copy the pre-built workflows from the examples/workflows directory to your repository's .github/workflows directory.

Pull Request Review:

Issue Triage:

General AI Assistance:

This action provides several pre-built workflows for different use cases. Each workflow is designed to be copied into your repository's .github/workflows directory and customized as needed.

This action can be used to triage GitHub Issues automatically or on a schedule. For a detailed guide on how to set up the issue triage system, go to the GitHub Issue Triage workflow documentation.

This action can be used to automatically review pull requests when they are opened. For a detailed guide on how to set up the pull request review system, go to the GitHub PR Review workflow documentation.

There is a known issue that action bot may approve the PR occasionally, to avoid this situation as org owner you can restrict who can approve the PR following Code Review Limits.

This type of action can be used to invoke a general-purpose, conversational Gemini AI assistant within the pull requests and issues to perform a wide range of tasks. For a detailed guide on how to set up the general-purpose Gemini CLI workflow, go to the Gemini CLI workflow documentation.

We recommend setting the following values as repository variables so they can be reused across all workflows. Alternatively, you can set them inline as action inputs in individual workflows or to override repository-level values.

Name Description Type Required When Required GEMINI_CLI_VERSION Controls which version of the Gemini CLI is installed. Variable No Pinning the CLI version GCP_WIF_PROVIDER Full resource name of the Workload Identity Provider. Variable No Using Google Cloud GOOGLE_CLOUD_PROJECT Google Cloud project for inference and observability. Variable No Using Google Cloud SERVICE_ACCOUNT_EMAIL Google Cloud service account email address. Variable No Using Google Cloud GOOGLE_CLOUD_LOCATION Region of the Google Cloud project. Variable No Using Google Cloud GOOGLE_GENAI_USE_VERTEXAI Set to true to use Vertex AI Variable No Using Vertex AI GOOGLE_GENAI_USE_GCA Set to true to use Gemini Code Assist Variable No Using Gemini Code Assist APP_ID GitHub App ID for custom authentication. Variable No Using a custom GitHub App

To add a repository variable:

  1. Go to your repository's Settings > Secrets and variables > Actions > New variable.
  2. Enter the variable name and value.
  3. Save.

For details about repository variables, refer to the GitHub documentation on variables.

You can set the following secrets in your repository:

Name Description Required When Required GEMINI_API_KEY Your Gemini API key from Google AI Studio. No You don't have a GCP project. APP_PRIVATE_KEY Private key for your GitHub App (PEM format). No Using a custom GitHub App.

To add a secret:

  1. Go to your repository's Settings > Secrets and variables >Actions > New repository secret.
  2. Enter the secret name and value.
  3. Save.

For more information, refer to the official GitHub documentation on creating and using encrypted secrets.

This action requires authentication to both Google services (for Gemini AI) and the GitHub API.

Choose the authentication method that best fits your use case:

  1. Gemini API Key: The simplest method for projects that don't require Google Cloud integration
  2. Workload Identity Federation: The most secure method for authenticating to Google Cloud services

You can authenticate with GitHub in two ways:

  1. Default GITHUB_TOKEN: For simpler use cases, the action can use the default GITHUB_TOKEN provided by the workflow.
  2. Custom GitHub App (Recommended): For the most secure and flexible authentication, we recommend creating a custom GitHub App.

For detailed setup instructions for both Google and GitHub authentication, go to the Authentication documentation.

This action can be configured to send telemetry data (traces, metrics, and logs) to your own Google Cloud project. This allows you to monitor the performance and behavior of the Gemini CLI within your workflows, providing valuable insights for debugging and optimization.

For detailed instructions on how to set up and configure observability, go to the Observability documentation.

Create a GEMINI.md file in the root of your repository to provide project-specific context and instructions to Gemini CLI. This is useful for defining coding conventions, architectural patterns, or other guidelines the model should follow for a given repository.

Contributions are welcome! Check out the Gemini CLI Contributing Guide for more details on how to get started.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4