@@ -20,9 +20,20 @@ description: |-
2020inputs :
2121 service :
2222 description : |-
23- (Required, unless providing `metadata` or `job`) ID of the service or
24- fully-qualified identifier of the service. Only one of `service` or `job`
25- may be specified.
23+ ID of the service or fully-qualified identifier of the service. This is
24+ required unless providing `metadata` or `job`.
25+ required : false
26+
27+ job :
28+ description : |-
29+ ID of the job or fully-qualified identifier of the job. This is required
30+ unless providing `metadata` or `service`.
31+ required : false
32+
33+ metadata :
34+ description : |-
35+ YAML service description for the Cloud Run service. This is required
36+ unless providing `service` or `job`.
2637 required : false
2738
2839 image :
@@ -43,158 +54,164 @@ inputs:
4354 to deploy. If specified, this will deploy the Cloud Run service from the
4455 code specified at the given source directory.
4556
46- This requires the Artifact Registry API to be enabled. Furthermore, the
47- deploying service account must have the `Cloud Build Service Account`
48- role. The initial deployment will create an Artifact Registry repository
49- which requires the `Artifact Registry Admin` role.
50- required : false
51-
52- job :
53- description : |-
54- (Required, unless providing `metadata` or `service`) ID of the job or
55- fully-qualified identifier of the job.
57+ Learn more about the required permissions in [Deploying from source
58+ code](https://cloud.google.com/run/docs/deploying-source-code).
5659 required : false
5760
5861 suffix :
5962 description : |-
60- (Optional) String suffix to append to the revision name. Revision names
61- always start with the service name automatically. For example, specifying
62- 'v1' for a service named 'helloworld', would lead to a revision named
63- 'helloworld-v1'. The default value is no suffix.
63+ String suffix to append to the revision name. Revision names always start
64+ with the service name automatically. For example, specifying 'v1' for a
65+ service named 'helloworld', would lead to a revision named
66+ 'helloworld-v1'.
6467 required : false
6568
6669 env_vars :
6770 description : |-
68- (Optional) List of key=value pairs to set as environment variables. All
69- existing environment variables will be retained. If both `env_vars` and
70- `env_vars_file` are specified, the keys in `env_vars` will take
71- precendence over the keys in `env_vars_files`.
72-
73- with:
74- env_vars: |
75- FOO=bar
76- ZIP=zap
77-
78- Entries are separated by commas (`,`) and newline characters. Keys and
79- values are separated by `=`. To use `,`, `=`, or newline characters,
80- escape them with a backslash:
81-
82- with:
83- env_vars: |
84- EMAILS=foo@bar.com\,zip@zap.com
71+ List of environment variables that should be set in the environment.
72+ These are comma-separated or newline-separated `KEY=VALUE`. Keys or values
73+ that contain separators must be escaped with a backslash (e.g. `\,` or
74+ `\\n`) unless quoted. Any leading or trailing whitespace is trimmed unless
75+ values are quoted.
76+
77+ env_vars: |-
78+ FRUIT=apple
79+ SENTENCE=" this will retain leading and trailing spaces "
80+
81+ This value will only be set if the input is a non-empty value. If a
82+ non-empty value is given, the field values will be overwritten (not
83+ merged). To remove all values, set the value to the literal string `{}`.
84+
85+ If both `env_vars` and `env_vars_file` are specified, the keys in
86+ `env_vars` will take precendence over the keys in `env_vars_files`.
8587 required : false
8688
8789 env_vars_file :
8890 description : |-
89- (Optional) Path to a file on disk, relative to the workspace, that defines
91+ Path to a file on disk, relative to the workspace, that defines
9092 environment variables. The file can be newline-separated KEY=VALUE pairs,
9193 JSON, or YAML format. If both `env_vars` and `env_vars_file` are
9294 specified, the keys in env_vars will take precendence over the keys in
9395 env_vars_files.
9496
95- FOO=bar
96- ZIP=zap
97-
98- or
99-
100- {
101- "FOO": "bar",
102- "ZIP": "zap"
103- }
104-
105- or
106-
107- FOO: 'bar'
108- ZIP: 'zap'
97+ NAME=person
98+ EMAILS=foo@bar.com\,zip@zap.com
10999
110100 When specified as KEY=VALUE pairs, the same escaping rules apply as
111101 described in `env_vars`. You do not have to escape YAML or JSON.
102+
103+ If both `env_vars` and `env_vars_file` are specified, the keys in
104+ `env_vars` will take precendence over the keys in `env_vars_files`.
105+
106+ **⚠️ DEPRECATION NOTICE:** This input is deprecated and will be removed in
107+ the next major version release.
112108 required : false
113109
114110 env_vars_update_strategy :
115111 description : |-
116- (Optional) Controls how the environment variables are set on the Cloud Run
117- service. If set to "merge", then the environment variables are merged with
118- any upstream values. If set to "overwrite", then all environment variables
119- on the Cloud Run service will be replaced with exactly the values given by
112+ Controls how the environment variables are set on the Cloud Run service.
113+ If set to "merge", then the environment variables are _merged_ with any
114+ upstream values. If set to "overwrite", then all environment variables on
115+ the Cloud Run service will be replaced with exactly the values given by
120116 the GitHub Action (making it authoritative).
121- required : true
122117 default : ' merge'
118+ required : true
123119
124120 secrets :
125121 description : |-
126- (Optional) List of key=value pairs to use as secrets. These can either be
127- injected as environment variables or mounted as volumes. All existing
128- environment secrets and volume mounts will be retained.
122+ List of KEY=VALUE pairs to use as secrets. These are comma-separated or
123+ newline-separated `KEY=VALUE`. Keys or values that contain separators must
124+ be escaped with a backslash (e.g. `\,` or `\\n`) unless quoted. Any
125+ leading or trailing whitespace is trimmed unless values are quoted.
126+
127+ These can either be injected as environment variables or mounted as
128+ volumes. Keys starting with a forward slash '/' are mount paths. All other
129+ keys correspond to environment variables:
129130
130- with:
131- secrets: |
132- # As an environment variable:
133- KEY1=secret-key-1:latest
131+ with:
132+ secrets: |-
133+ # As an environment variable:
134+ KEY1=secret-key-1:latest
134135
135- # As a volume mount:
136- /secrets/api/key=secret-key-2:latest
136+ # As a volume mount:
137+ /secrets/api/key=secret-key-2:latest
137138
138- The same rules apply for escaping entries as from `env_vars`, but Cloud
139- Run is more restrictive with allowed keys and names for secrets.
139+ This value will only be set if the input is a non-empty value. If a
140+ non-empty value is given, the field values will be overwritten (not
141+ merged). To remove all values, set the value to the literal string `{}`.
140142 required : false
141143
142144 secrets_update_strategy :
143145 description : |-
144- (Optional) Controls how the secrets are set on the Cloud Run service. If
145- set to " merge" , then the secrets are merged with any upstream values. If
146- set to " overwrite" , then all secrets on the Cloud Run service will be
147- replaced with exactly the values given by the GitHub Action (making it
146+ Controls how the secrets are set on the Cloud Run service. If set to
147+ ` merge` , then the secrets are merged with any upstream values. If set to
148+ ` overwrite` , then all secrets on the Cloud Run service will be replaced
149+ with exactly the values given by the GitHub Action (making it
148150 authoritative).
149- required : true
150151 default : ' merge'
152+ required : true
151153
152154 labels :
153155 description : |-
154- (Optional) List of key=value pairs to set as labels on the Cloud
155- Run service. Existing labels will be overwritten.
156+ List of labels that should be set on the function. These are
157+ comma-separated or newline-separated `KEY=VALUE`. Keys or values that
158+ contain separators must be escaped with a backslash (e.g. `\,` or `\\n`)
159+ unless quoted. Any leading or trailing whitespace is trimmed unless values
160+ are quoted.
156161
157- with:
158162 labels: |-
159- my-label=my-value
163+ labela=my-label
164+ labelb=my-other-label
165+
166+ This value will only be set if the input is a non-empty value. If a
167+ non-empty value is given, the field values will be overwritten (not
168+ merged). To remove all values, set the value to the literal string `{}`.
160169
161- The same rules apply for escaping entries as from `env_vars`, but labels
162- have strict naming and casing requirements .
170+ Google Cloud restricts the allowed values and length for labels. Please
171+ see the Google Cloud documentation for labels for more information .
163172 required : false
164173
165174 skip_default_labels :
166175 description : |-
167- (Optional) Skip applying the special annotation labels that indicate the
168- deployment came from GitHub Actions. The GitHub Action will automatically
169- apply the following labels which Cloud Run uses to enhance the user
170- experience:
176+ Skip applying the special annotation labels that indicate the deployment
177+ came from GitHub Actions. The GitHub Action will automatically apply the
178+ following labels which Cloud Run uses to enhance the user experience:
171179
172180 managed-by: github-actions
173181 commit-sha: <sha>
174182
175- Setting this to `true` will skip adding these special labels. The default
176- value is `false`.
183+ Setting this to `true` will skip adding these special labels.
177184 required : false
178- default : false
185+ default : ' false'
179186
180187 tag :
181188 description : |-
182- (Optional) Traffic tag to assign to the newly-created revision.
189+ Traffic tag to assign to the newly-created revision.
183190 required : false
184191
185192 timeout :
186193 description : |-
187- (Optional) Maximum request execution time, specified as a duration like
188- "10m5s" for ten minutes and 5 seconds.
194+ Maximum request execution time, specified as a duration like "10m5s" for
195+ ten minutes and 5 seconds.
189196 required : false
190197
191198 flags :
192199 description : |-
193- (Optional) Space separate list of other Cloud Run flags. This can be used
194- to access features that are not exposed via this GitHub Action.
200+ Space separate list of other Cloud Run flags. This can be used to access
201+ features that are not exposed via this GitHub Action.
202+
203+ with:
204+ flags: '--add-cloudsql-instances=...'
195205
196- with:
197- flags: '--add-cloudsql-instances=...'
206+ Flags that include other flags must quote the _entire_ outer flag value. For
207+ example, to pass `--args=-X=123`:
208+
209+ with:
210+ flags: '--add-cloudsql-instances=... "--args=-X=123"'
211+
212+ See the [complete list of
213+ flags](https://cloud.google.com/sdk/gcloud/reference/run/deploy#FLAGS) for
214+ more information.
198215
199216 Please note, this GitHub Action does not parse or validate the flags. You
200217 are responsible for making sure the flags are available on the gcloud
@@ -205,15 +222,13 @@ inputs:
205222
206223 no_traffic :
207224 description : |-
208- (Optional) If true, the newly deployed revision will not receive traffic.
209- The default value is false.
210- default : false
225+ If true, the newly deployed revision will not receive traffic.
226+ default : ' false'
211227 required : false
212228
213229 revision_traffic :
214230 description : |-
215- (Optional, mutually-exclusive with `tag_traffic`) Comma-separated list of
216- revision traffic assignments.
231+ Comma-separated list of revision traffic assignments.
217232
218233 with:
219234 revision_traffic: 'my-revision=10' # percentage
@@ -222,29 +237,31 @@ inputs:
222237
223238 with:
224239 revision_traffic: 'LATEST=100'
240+
241+ This is mutually-exclusive with `tag_traffic`.
225242 required : false
226243
227244 tag_traffic :
228245 description : |-
229- (Optional, mutually-exclusive with `revision_traffic`) Comma-separated
230- list of tag traffic assignments.
246+ Comma-separated list of tag traffic assignments.
231247
232248 with:
233249 tag_traffic: 'my-tag=10' # percentage
250+
251+ This is mutually-exclusive with `revision_traffic`.
234252 required : false
235253
236254 project_id :
237255 description : |-
238- (Optional) ID of the Google Cloud project in which to deploy the service.
239- The default value is computed from the environment.
256+ ID of the Google Cloud project in which to deploy the service.
240257 required : false
241258
242259 region :
243260 description : |-
244- (Optional) Regions in which the Cloud Run services are deployed. This can
245- be a single region or a comma-separated list of regions.
246- required : false
261+ Regions in which the Cloud Run services are deployed. This can be a single
262+ region or a comma-separated list of regions.
247263 default : ' us-central1'
264+ required : false
248265
249266 gcloud_version :
250267 description : |-
@@ -255,20 +272,13 @@ inputs:
255272
256273 gcloud_component :
257274 description : |-
258- Version of the Cloud SDK components to install and use. If unspecified, the latest
259- or released version will be used. This is the equivalent of running
260- 'gcloud alpha run' or 'gcloud beta run'. Valid values are `alpha` or `beta`.
261- required : false
262-
263- metadata :
264- description : |-
265- YAML service description for the Cloud Run service.
275+ Version of the Cloud SDK components to install and use.
266276 required : false
267277
268278outputs :
269279 url :
270280 description : |-
271- The URL of your Cloud Run service
281+ The URL of the Cloud Run service.
272282
273283branding :
274284 icon : ' chevrons-right'
0 commit comments