You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -153,6 +163,8 @@ go to the [Gemini CLI workflow documentation](./examples/workflows/gemini-cli).
153
163
154
164
- <aname="gemini_cli_version"></a><ahref="#user-content-gemini_cli_version"><code>gemini_cli_version</code></a>: _(Optional, default: `latest`)_ The version of the Gemini CLI to install.
155
165
166
+
- <aname="google_api_key"></a><ahref="#user-content-google_api_key"><code>google_api_key</code></a>: _(Optional)_ The Vertex AI API key to use with Gemini.
167
+
156
168
157
169
<!-- END_AUTOGEN_INPUTS -->
158
170
@@ -162,6 +174,8 @@ go to the [Gemini CLI workflow documentation](./examples/workflows/gemini-cli).
162
174
163
175
-`summary`: The summarized output from the Gemini CLI execution.
164
176
177
+
-`error`: The error output from the Gemini CLI execution, if any.
178
+
165
179
166
180
<!-- END_AUTOGEN_OUTPUTS -->
167
181
@@ -180,22 +194,23 @@ We recommend setting the following values as repository variables so they can be
180
194
|`GOOGLE_GENAI_USE_GCA`| Set to `true` to use Gemini Code Assist | Variable | No | Using Gemini Code Assist |
181
195
|`APP_ID`| GitHub App ID for custom authentication. | Variable | No | Using a custom GitHub App |
182
196
183
-
184
197
To add a repository variable:
185
-
1) Go to your repository's **Settings > Secrets and variables > Actions > New variable**.
186
-
2) Enter the variable name and value.
187
-
3) Save.
198
+
199
+
1. Go to your repository's **Settings > Secrets and variables > Actions > New variable**.
200
+
2. Enter the variable name and value.
201
+
3. Save.
188
202
189
203
For details about repository variables, refer to the [GitHub documentation on variables][variables].
190
204
191
205
### Secrets
192
206
193
207
You can set the following secrets in your repository:
Copy file name to clipboardExpand all lines: docs/authentication.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,30 @@ This is the simplest method and is suitable for projects that do not require Goo
56
56
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
57
57
```
58
58
59
-
### Method 2: Authenticating with Google Cloud
59
+
### Method 2: Authenticating with a Vertex AI API Key
60
+
61
+
This method is used for quick setup using Vertex AI through Google Cloud Console
62
+
63
+
#### Prerequisites
64
+
65
+
- A Vertex AI API key from Google Cloud Console
66
+
67
+
#### Setup
68
+
69
+
1. **Create an API Key**: Obtain your Google Cloud [API key](https://cloud.google.com/vertex-ai/generative-ai/docs/start/api-keys?usertype=newuser)
70
+
2. **Add to GitHub Secrets**: In your GitHub repository, go to **Settings > Secrets and variables > Actions** and add a new repository secret with the name `GOOGLE_API_KEY` and paste your key as the value and create new variable with the name `GOOGLE_GENAI_USE_VERTEXAI` and set value as `true`.
71
+
72
+
#### Example
73
+
74
+
```yaml
75
+
- uses: 'google-github-actions/run-gemini-cli@v0'
76
+
with:
77
+
prompt: |-
78
+
Explain this code
79
+
google_api_key: '${{ secrets.GOOGLE_API_KEY }}'
80
+
```
81
+
82
+
### Method 3: Authenticating with Google Cloud
60
83
61
84
**[Workload Identity Federation](https://cloud.google.com/iam/docs/workload-identity-federation)** is Google Cloud's preferred, keyless authentication method for GitHub Actions. It provides:
0 commit comments