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
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,10 @@ go to the [Gemini Assistant workflow documentation](./examples/workflows/gemini-
160
160
161
161
- <aname="__input_gcp_workload_identity_provider"></a><ahref="#user-content-__input_gcp_workload_identity_provider"><code>gcp_workload_identity_provider</code></a>: _(Optional)_ The Google Cloud Workload Identity Provider.
162
162
163
+
- <aname="__input_gcp_token_format"></a><ahref="#user-content-__input_gcp_token_format"><code>gcp_token_format</code></a>: _(Optional, default: `access_token`)_ The token format for authentication. Set to "access_token" to generate access tokens (requires service account), or set to empty string for direct WIF. Can be "access_token" or "id_token".
164
+
165
+
- <aname="__input_gcp_access_token_scopes"></a><ahref="#user-content-__input_gcp_access_token_scopes"><code>gcp_access_token_scopes</code></a>: _(Optional, default: `https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/userinfo.profile`)_ The access token scopes when using token_format "access_token". Comma-separated list of OAuth 2.0 scopes.
166
+
163
167
- <aname="__input_gemini_api_key"></a><ahref="#user-content-__input_gemini_api_key"><code>gemini_api_key</code></a>: _(Optional)_ The API key for the Gemini API.
164
168
165
169
- <aname="__input_gemini_cli_version"></a><ahref="#user-content-__input_gemini_cli_version"><code>gemini_cli_version</code></a>: _(Optional, default: `latest`)_ The version of the Gemini CLI to install. Can be "latest", "preview", "nightly", a specific version number, or a git branch, tag, or commit. For more information, see [Gemini CLI releases](https://github.com/google-gemini/gemini-cli/blob/main/docs/releases.md).
@@ -209,7 +213,7 @@ We recommend setting the following values as repository variables so they can be
209
213
|`GEMINI_CLI_VERSION`| Controls which version of the Gemini CLI is installed. | Variable | No | Pinning the CLI version |
210
214
|`GCP_WIF_PROVIDER`| Full resource name of the Workload Identity Provider. | Variable | No | Using Google Cloud |
211
215
|`GOOGLE_CLOUD_PROJECT`| Google Cloud project for inference and observability. | Variable | No | Using Google Cloud |
212
-
|`SERVICE_ACCOUNT_EMAIL`| Google Cloud service account email address. | Variable | No | Using Google Cloud |
216
+
|`SERVICE_ACCOUNT_EMAIL`| Google Cloud service account email address. Optional - only needed for WIF with service account (not required for direct WIF). | Variable | No | Using WIF with service account|
213
217
|`GOOGLE_CLOUD_LOCATION`| Region of the Google Cloud project. | Variable | No | Using Google Cloud |
214
218
|`GOOGLE_GENAI_USE_VERTEXAI`| Set to `true` to use Vertex AI | Variable | No | Using Vertex AI |
215
219
|`GOOGLE_GENAI_USE_GCA`| Set to `true` to use Gemini Code Assist | Variable | No | Using Gemini Code Assist |
Copy file name to clipboardExpand all lines: action.yml
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,14 @@ inputs:
30
30
gcp_workload_identity_provider:
31
31
description: 'The Google Cloud Workload Identity Provider.'
32
32
required: false
33
+
gcp_token_format:
34
+
description: 'The token format for authentication. Set to "access_token" to generate access tokens (requires service account), or set to empty string for direct WIF. Can be "access_token" or "id_token".'
35
+
required: false
36
+
default: 'access_token'
37
+
gcp_access_token_scopes:
38
+
description: 'The access token scopes when using token_format "access_token". Comma-separated list of OAuth 2.0 scopes.'
if [[ "${INPUT_GCP_WORKLOAD_IDENTITY_PROVIDER_PRESENT:-false}" == "true" ]]; then
126
-
if [[ "${INPUT_GCP_PROJECT_ID_PRESENT:-false}" != "true" || "${INPUT_GCP_SERVICE_ACCOUNT_PRESENT:-false}" != "true" ]]; then
127
-
warn "When using Workload Identity Federation ('gcp_workload_identity_provider'), you must also provide 'gcp_project_id' and 'gcp_service_account'."
134
+
if [[ "${INPUT_GCP_PROJECT_ID_PRESENT:-false}" != "true" ]]; then
135
+
warn "When using Workload Identity Federation ('gcp_workload_identity_provider'), you must also provide 'gcp_project_id'."
136
+
fi
137
+
# Service account is required when using token_format (default behavior)
138
+
# Only optional when explicitly set to empty for direct WIF
139
+
if [[ "${INPUT_GCP_TOKEN_FORMAT}" != "" && "${INPUT_GCP_SERVICE_ACCOUNT_PRESENT:-false}" != "true" ]]; then
140
+
warn "When using Workload Identity Federation with token generation ('gcp_token_format'), you must also provide 'gcp_service_account'. To use direct WIF without a service account, explicitly set 'gcp_token_format' to an empty string."
128
141
fi
129
142
if [[ "${INPUT_USE_VERTEX_AI:-false}" == "${INPUT_USE_GEMINI_CODE_ASSIST:-false}" ]]; then
130
143
warn "When using Workload Identity Federation, you must set exactly one of 'use_vertex_ai' or 'use_gemini_code_assist' to 'true'."
0 commit comments