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
The error messages in the input validation script (scripts/validate-inputs.sh) have been updated to improve clarity and ensure they are correctly displayed in the GitHub Actions logs.
- The format of the ::error annotations was simplified to the basic ::error::message syntax to prevent them from being hidden in the logs.
- The content of the error messages was made more descriptive to help users debug configuration issues more easily.
- A minor formatting change (adding a newline) was made to action.yml.
Copy file name to clipboardExpand all lines: scripts/validate-inputs.sh
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -19,47 +19,47 @@ if [[ "${google_api_key_present}" == "true" ]]; then ((auth_methods++)); fi
19
19
if [[ "${gcp_workload_identity_provider_present}"=="true" ]];then((auth_methods++));fi
20
20
21
21
if [[ ${auth_methods}-eq 0 ]];then
22
-
echo"::error title=Configuration error::No authentication method provided. Please provide one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'.">&2
22
+
echo"::error::No authentication method provided. Please provide one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'."
23
23
exit 1
24
24
fi
25
25
26
26
if [[ ${auth_methods}-gt 1 ]];then
27
-
echo"::error title=Configuration error::Multiple authentication methods provided. Please use only one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'.">&2
27
+
echo"::error::Multiple authentication methods provided. Please use only one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'."
28
28
exit 1
29
29
fi
30
30
31
31
# WIF validation
32
32
if [[ "${gcp_workload_identity_provider_present}"=="true" ]];then
33
33
if [[ "${gcp_project_id_present}"!="true"||"${gcp_service_account_present}"!="true" ]];then
34
-
echo"::error title=Configuration error::When using Workload Identity Federation ('gcp_workload_identity_provider'), you must also provide 'gcp_project_id' and 'gcp_service_account'.">&2
34
+
echo"::error::When using Workload Identity Federation ('gcp_workload_identity_provider'), you must also provide 'gcp_project_id' and 'gcp_service_account'."
35
35
exit 1
36
36
fi
37
37
if [[ "${use_vertex_ai}"!="true"&&"${use_gemini_code_assist}"!="true" ]];then
38
-
echo"::error title=Configuration error::When using Workload Identity Federation, you must set either 'use_vertex_ai' or 'use_gemini_code_assist' to 'true'.">&2
38
+
echo"::error::When using Workload Identity Federation, you must set either 'use_vertex_ai' or 'use_gemini_code_assist' to 'true'. Both are set to 'false', please choose one."
39
39
exit 1
40
40
fi
41
41
if [[ "${use_vertex_ai}"=="true"&&"${use_gemini_code_assist}"=="true" ]];then
42
-
echo"::error title=Configuration error::'use_vertex_ai' and 'use_gemini_code_assist' cannot both be 'true'.">&2
42
+
echo"::error::When using Workload Identity Federation, 'use_vertex_ai' and 'use_gemini_code_assist' cannot both be 'true'. Both are set to 'true', please choose one."
43
43
exit 1
44
44
fi
45
45
fi
46
46
47
47
# Vertex AI API Key validation
48
48
if [[ "${google_api_key_present}"=="true" ]];then
49
49
if [[ "${use_vertex_ai}"!="true" ]];then
50
-
echo"::error title=Configuration error::When using 'google_api_key', you must set 'use_vertex_ai' to 'true'.">&2
50
+
echo"::error::When using 'google_api_key', you must set 'use_vertex_ai' to 'true'."
51
51
exit 1
52
52
fi
53
53
if [[ "${use_gemini_code_assist}"=="true" ]];then
54
-
echo"::error title=Configuration error::'use_gemini_code_assist' cannot be 'true' when using 'google_api_key'.">&2
54
+
echo"::error::When using 'google_api_key', 'use_gemini_code_assist' cannot be 'true'."
55
55
exit 1
56
56
fi
57
57
fi
58
58
59
59
# Gemini API Key validation
60
60
if [[ "${gemini_api_key_present}"=="true" ]];then
61
61
if [[ "${use_vertex_ai}"=="true"||"${use_gemini_code_assist}"=="true" ]];then
62
-
echo"::error title=Configuration error::When using 'gemini_api_key', both 'use_vertex_ai' and 'use_gemini_code_assist' must be 'false'.">&2
62
+
echo"::error::When using 'gemini_api_key', both 'use_vertex_ai' and 'use_gemini_code_assist' must be 'false'."
0 commit comments