@@ -20,9 +20,20 @@ description: |-
20
20
inputs :
21
21
service :
22
22
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`.
26
37
required : false
27
38
28
39
image :
@@ -43,158 +54,164 @@ inputs:
43
54
to deploy. If specified, this will deploy the Cloud Run service from the
44
55
code specified at the given source directory.
45
56
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).
56
59
required : false
57
60
58
61
suffix :
59
62
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'.
64
67
required : false
65
68
66
69
env_vars :
67
70
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
-
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`.
85
87
required : false
86
88
87
89
env_vars_file :
88
90
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
90
92
environment variables. The file can be newline-separated KEY=VALUE pairs,
91
93
JSON, or YAML format. If both `env_vars` and `env_vars_file` are
92
94
specified, the keys in env_vars will take precendence over the keys in
93
95
env_vars_files.
94
96
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
+
109
99
110
100
When specified as KEY=VALUE pairs, the same escaping rules apply as
111
101
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.
112
108
required : false
113
109
114
110
env_vars_update_strategy :
115
111
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
120
116
the GitHub Action (making it authoritative).
121
- required : true
122
117
default : ' merge'
118
+ required : true
123
119
124
120
secrets :
125
121
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:
129
130
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
134
135
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
137
138
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 `{}`.
140
142
required : false
141
143
142
144
secrets_update_strategy :
143
145
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
148
150
authoritative).
149
- required : true
150
151
default : ' merge'
152
+ required : true
151
153
152
154
labels :
153
155
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.
156
161
157
- with:
158
162
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 `{}`.
160
169
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 .
163
172
required : false
164
173
165
174
skip_default_labels :
166
175
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:
171
179
172
180
managed-by: github-actions
173
181
commit-sha: <sha>
174
182
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.
177
184
required : false
178
- default : false
185
+ default : ' false'
179
186
180
187
tag :
181
188
description : |-
182
- (Optional) Traffic tag to assign to the newly-created revision.
189
+ Traffic tag to assign to the newly-created revision.
183
190
required : false
184
191
185
192
timeout :
186
193
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.
189
196
required : false
190
197
191
198
flags :
192
199
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=...'
195
205
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.
198
215
199
216
Please note, this GitHub Action does not parse or validate the flags. You
200
217
are responsible for making sure the flags are available on the gcloud
@@ -205,15 +222,13 @@ inputs:
205
222
206
223
no_traffic :
207
224
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'
211
227
required : false
212
228
213
229
revision_traffic :
214
230
description : |-
215
- (Optional, mutually-exclusive with `tag_traffic`) Comma-separated list of
216
- revision traffic assignments.
231
+ Comma-separated list of revision traffic assignments.
217
232
218
233
with:
219
234
revision_traffic: 'my-revision=10' # percentage
@@ -222,29 +237,31 @@ inputs:
222
237
223
238
with:
224
239
revision_traffic: 'LATEST=100'
240
+
241
+ This is mutually-exclusive with `tag_traffic`.
225
242
required : false
226
243
227
244
tag_traffic :
228
245
description : |-
229
- (Optional, mutually-exclusive with `revision_traffic`) Comma-separated
230
- list of tag traffic assignments.
246
+ Comma-separated list of tag traffic assignments.
231
247
232
248
with:
233
249
tag_traffic: 'my-tag=10' # percentage
250
+
251
+ This is mutually-exclusive with `revision_traffic`.
234
252
required : false
235
253
236
254
project_id :
237
255
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.
240
257
required : false
241
258
242
259
region :
243
260
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.
247
263
default : ' us-central1'
264
+ required : false
248
265
249
266
gcloud_version :
250
267
description : |-
@@ -255,20 +272,13 @@ inputs:
255
272
256
273
gcloud_component :
257
274
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.
266
276
required : false
267
277
268
278
outputs :
269
279
url :
270
280
description : |-
271
- The URL of your Cloud Run service
281
+ The URL of the Cloud Run service.
272
282
273
283
branding :
274
284
icon : ' chevrons-right'
0 commit comments