@@ -92,61 +92,46 @@ jobs:
9292 specifying 'v1' for a service named 'helloworld', would lead to a revision
9393 named 'helloworld-v1'. The default value is no suffix.
9494
95- - `env_vars` : (Optional) List of key=value pairs to set as environment
96- variables. All existing environment variables will be retained. If both
97- ` env_vars` and `env_vars_file` are specified, the keys in `env_vars` will take
98- precendence over the keys in `env_vars_files`.
95+ - `env_vars`, `env_vars_file`, and `env_vars_update_strategy` : (Optional)
96+ These values define environment variables and their update strategy.
9997
100- ` ` ` yaml
101- with:
102- env_vars: |
103- FOO=bar
104- ZIP=zap
105- ` ` `
106-
107- Entries are separated by commas (`,`) and newline characters. Keys and
108- values are separated by `=`. To use `,`, `=`, or newline characters, escape
109- them with a backslash :
98+ ` env_vars` is specified as comma-separated or newline-separated key-value
99+ pairs, with special characters escaped using a backslash.
110100
111101 ` ` ` yaml
112102 with:
113103 env_vars: |
104+ NAME=person
114105 EMAILS=foo@bar.com\, zip@zap.com
115106 ` ` `
116107
117- - `env_vars_file` : (Optional) Path to a file on disk, relative to the
118- workspace, that defines environment variables. The file can be
119- newline-separated KEY=VALUE pairs, JSON, or YAML format. If both `env_vars`
120- and `env_vars_file` are specified, the keys in env_vars will take
121- precendence over the keys in env_vars_files.
108+ ` env_vars_file` is the path to a file on disk relative to the workspace that
109+ defines newline-separated KEY=VALUE pairs, JSON, or YAML.
122110
123111 ` ` ` text
124- FOO=bar
125- ZIP= zap
112+ NAME=person
113+ EMAILS=foo@bar.com \, zip@ zap.com
126114 ` ` `
127115
128- or
129-
130- ` ` ` json
131- {
132- "FOO": "bar",
133- "ZIP": "zap"
134- }
135- ` ` `
116+ If both `env_vars` and `env_vars_file` are specified, they are merged and
117+ the values from `env_vars` will take precedence on conflict.
136118
137- or
119+ ` env_vars_update_strategy` controls how the environment variables are set on
120+ the Cloud Run service. If `env_vars_update_strategy` is set to "merge", then
121+ the environment variables are _merged_ with any upstream values. If set to
122+ " overwrite" , then all environment variables on the Cloud Run service will be
123+ replaced with exactly the values given by the GitHub Action (making it
124+ authoritative). The default value is "merge".
138125
139126 ` ` ` yaml
140- FOO: 'bar'
141- ZIP : 'zap '
127+ with:
128+ env_vars_update_strategy : 'overwrite '
142129 ` ` `
143130
144- When specified as KEY=VALUE pairs, the same escaping rules apply as
145- described in `env_vars`. You do not have to escape YAML or JSON.
146-
147- - `secrets` : (Optional) List of key=value pairs to use as secrets. These can
148- either be injected as environment variables or mounted as volumes. All
149- existing environment secrets and volume mounts will be retained.
131+ - `secrets`, `secrets_update_strategy` : (Optional) List of key=value pairs to
132+ use as secrets. These can either be injected as environment variables or
133+ mounted as volumes. All existing environment secrets and volume mounts will
134+ be retained.
150135
151136 ` ` ` yaml
152137 with:
@@ -161,6 +146,18 @@ jobs:
161146 The same rules apply for escaping entries as from `env_vars`, but Cloud Run
162147 is more restrictive with allowed keys and names for secrets.
163148
149+ ` secrets_update_strategy` controls how the secrets are set on the Cloud Run
150+ service. If `secrets_update_strategy` is set to "merge", then the secrets
151+ are _merged_ with any upstream values. If set to "overwrite", then all
152+ secrets on the Cloud Run service will be replaced with exactly the values
153+ given by the GitHub Action (making it authoritative). The default value is
154+ " merge" .
155+
156+ ` ` ` yaml
157+ with:
158+ secrets_update_strategy: 'overwrite'
159+ ` ` `
160+
164161- `labels` : (Optional) List of key=value pairs to set as labels on the Cloud
165162 Run service. Existing labels will be overwritten.
166163
0 commit comments