This repository was archived by the owner on Aug 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -28,24 +28,17 @@ jobs:
28
28
pull-requests : write
29
29
issues : write
30
30
steps :
31
- - name : Generate GitHub App Token
32
- id : generate_token
33
- uses : actions/create-github-app-token@v1
34
- with :
35
- app-id : ${{ secrets.APP_ID }}
36
- private-key : ${{ secrets.PRIVATE_KEY }}
37
-
38
31
- name : Checkout PR code
39
32
uses : actions/checkout@v4
40
33
with :
41
- token : ${{ steps.generate_token.outputs.token }}
34
+ token : ${{ secrets.GITHUB_TOKEN }}
42
35
ref : ${{ github.event.pull_request.head.sha }}
43
36
fetch-depth : 0
44
37
45
38
- name : Get PR details
46
39
id : get_pr
47
40
env :
48
- GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49
42
run : |
50
43
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
51
44
PR_NUMBER=${{ github.event.inputs.pr_number }}
78
71
- name : Run Gemini PR Review
79
72
uses : ./
80
73
env :
81
- GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
74
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82
75
PR_NUMBER : ${{ steps.get_pr.outputs.pr_number }}
83
76
PR_DATA : ${{ steps.get_pr.outputs.pr_data }}
84
77
CHANGED_FILES : ${{ steps.get_pr.outputs.changed_files }}
87
80
with :
88
81
version : 0.1.8-rc.0
89
82
GEMINI_API_KEY : ${{ secrets.GEMINI_API_KEY }}
83
+ GOOGLE_CLOUD_PROJECT : ${{ secrets.GOOGLE_CLOUD_PROJECT }}
84
+ GOOGLE_CLOUD_LOCATION : ${{ secrets.GOOGLE_CLOUD_LOCATION }}
90
85
OTLP_GCP_WIF_PROVIDER : ${{ secrets.OTLP_GCP_WIF_PROVIDER }}
91
86
OTLP_GOOGLE_CLOUD_PROJECT : ${{ secrets.OTLP_GOOGLE_CLOUD_PROJECT }}
92
87
settings_json : |
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ inputs:
10
10
GEMINI_API_KEY :
11
11
description : ' Your Gemini API key.'
12
12
required : true
13
+ GOOGLE_CLOUD_PROJECT :
14
+ description : ' The Google Cloud project.'
15
+ required : false
16
+ GOOGLE_CLOUD_LOCATION :
17
+ description : ' The Google Cloud project.'
18
+ required : false
13
19
OTLP_GCP_WIF_PROVIDER :
14
20
description : ' The workload identity provider for GCP authentication.'
15
21
required : false
81
87
shell : bash
82
88
env :
83
89
GEMINI_API_KEY : ${{ inputs.GEMINI_API_KEY }}
90
+ GOOGLE_GENAI_USE_VERTEXAI : true
91
+ GOOGLE_CLOUD_PROJECT : ${{ inputs.GOOGLE_CLOUD_PROJECT }}
92
+ GOOGLE_CLOUD_LOCATION : ${{ inputs.GOOGLE_CLOUD_LOCATION }}
84
93
PROMPT : ${{ inputs.prompt }}
85
94
86
95
branding :
Original file line number Diff line number Diff line change @@ -250,6 +250,12 @@ gcloud projects add-iam-policy-binding "${GCP_PROJECT_ID}" \
250
250
--member=" ${PRINCIPAL_SET} " \
251
251
--condition=None
252
252
253
+ print_info " Granting vertex permissions..."
254
+ gcloud projects add-iam-policy-binding " ${GCP_PROJECT_ID} " \
255
+ --role=" roles/aiplatform.admin" \
256
+ --member=" ${PRINCIPAL_SET} " \
257
+ --condition=None
258
+
253
259
print_success " Standard permissions granted to Workload Identity Pool"
254
260
255
261
# Get the full provider name for output
@@ -284,5 +290,11 @@ echo ""
284
290
echo " ☁️ Secret Name: OTLP_GOOGLE_CLOUD_PROJECT"
285
291
echo " Secret Value: ${GCP_PROJECT_ID} "
286
292
echo " "
293
+ echo " ☁️ Secret Name: GOOGLE_CLOUD_LOCATION"
294
+ echo " Secret Value: global"
295
+ echo " "
296
+ echo " ☁️ Secret Name: GOOGLE_CLOUD_PROJECT"
297
+ echo " Secret Value: ${GCP_PROJECT_ID} "
298
+ echo " "
287
299
288
300
print_success " Setup completed successfully! 🚀"
You can’t perform that action at this time.
0 commit comments