Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ inputs:
"env_vars" will take precendence over the keys in "env_vars_files".
required: false

env_vars_separator:
description: |-
String used to separate the env_vars for scaping comma characters.
See documentation: https://cloud.google.com/run/docs/configuring/services/environment-variables#escaping.
required: false

env_vars_file:
description: |-
Path to a file on disk, relative to the workspace, that defines
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export async function run(): Promise<void> {
const gcloudVersion = await computeGcloudVersion(getInput('gcloud_version'));
const gcloudComponent = presence(getInput('gcloud_component')); // Cloud SDK component version
const envVars = getInput('env_vars'); // String of env vars KEY=VALUE,...
const envVarsSeparator = getInput('env_vars_separator') || ','; // Characters to separate env_vars
const envVarsFile = getInput('env_vars_file'); // File that is a string of env vars KEY=VALUE,...
const secrets = parseKVString(getInput('secrets')); // String of secrets KEY=VALUE,...
const region = getInput('region') || 'us-central1';
Expand Down Expand Up @@ -190,7 +191,7 @@ export async function run(): Promise<void> {
// Set optional flags from inputs
const compiledEnvVars = parseKVStringAndFile(envVars, envVarsFile);
if (compiledEnvVars && Object.keys(compiledEnvVars).length > 0) {
cmd.push('--update-env-vars', kvToString(compiledEnvVars));
cmd.push('--update-env-vars', kvToString(compiledEnvVars, envVarsSeparator));
}
if (secrets && Object.keys(secrets).length > 0) {
cmd.push('--update-secrets', kvToString(secrets));
Expand Down