forked from google-github-actions/deploy-cloud-functions
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yaml
252 lines (213 loc) · 7.81 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Cloud Functions Deploy
description: |-
Use this action to deploy your function or
update an existing Cloud Function.
author: Google LLC
inputs:
credentials:
description: |-
(DEPRECATED) Optional service account key to use for authentication to
GCP. This should be the JSON formatted private key which can be exported
from the Cloud Console. The value can be raw or base64-encoded.
required: false
name:
description: |-
Name of the Cloud Function.
required: true
description:
description: |-
Description for the Cloud Function.
required: false
project_id:
description: |-
ID of the project in which to deploy the Cloud Function.
required: false
region:
description: |-
Region to deploy the function in. Defaults to us-central1, if not specified.
default: 'us-central1'
required: false
source_dir:
description: |-
Path to function deployment directory within the source repo.
default: './'
required: false
env_vars:
description: |-
List of key-value pairs to set as environment variables in the form KEY1=VALUE1,KEY2=VALUE2. Only one of env_vars or env_vars_file can be specified.
required: false
env_vars_file:
description: |-
Path to a local YAML file with definitions for all environment variables. Only one of env_vars or env_vars_file can be specified.
required: false
labels:
description: |-
List of key-value pairs to set as function labels in the form label1=VALUE1,label2=VALUE2.
required: false
entry_point:
description: |-
Name of a function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified.
required: false
runtime:
description: |-
Runtime to use for the function.
required: true
memory_mb:
description: |-
The amount of memory in MB available for a function. Defaults to 256.
required: false
vpc_connector:
description: |-
The VPC Access connector that the function can connect to.
required: false
vpc_connector_egress_settings:
description: |-
The egress settings for the connector, controlling what traffic is diverted through it.
required: false
ingress_settings:
description: |-
The ingress settings for the function, controlling what traffic can reach it.
required: false
secret_environment_variables:
description: |-
List of key-value pairs to set as environment variables at runtime of the
format "KEY1=SECRET_VERSION_REF" where SECRET_VERSION_REF is a full
resource name of a Google Secret Manager secret of the format
"projects/p/secrets/s/versions/v". If the project is omitted, it will be
inferred from the Cloud Function project ID. If the version is omitted, it
will default to "latest".
required: false
secret_volumes:
description: |-
List of key-value pairs to mount as volumes at runtime of the format
"PATH=SECRET_VERSION_REF" where PATH is the mount path inside the
container (e.g. "/etc/secrets/my-secret") and SECRET_VERSION_REF is a full
resource name of a Google Secret Manager secret of the format
"projects/p/secrets/s/versions/v". If the project is omitted, it will be
inferred from the Cloud Function project ID. If the version is omitted, it
will default to "latest".
required: false
service_account_email:
description: |-
The email address of the Google Cloud service account to use as the
runtime service account for the function. If unspecified, the default
Cloud Functions runtime service account is used.
Note this differs from the service account used to deploy the Cloud
Function, which is the currently-authenticated principal. However, the
deploying service account must have permission to impersonate the runtime
service account, which can be achieved by granting the deployment service
account "roles/iam.serviceAccountUser" permission on the runtime service
account.
required: false
timeout:
description: |-
The function execution timeout.
default: '60s'
required: false
min_instances:
description: |-
The minimum number of instances for the function.
required: false
max_instances:
description: |-
The maximum number of instances for the function.
required: false
https_trigger_security_level:
description: |-
The security level for an HTTP(s) trigger. If set to "secure_always", the
function will only be accessible over the https protocol. If set to
"secure_optional", the function will be accessible over the http and https
protocols. The default value is "security_level_unspecified", which uses
the platform's default value.
default: "security_level_unspecified"
required: false
event_trigger_type:
description: |-
Specifies which action should trigger the function.
required: false
event_trigger_resource:
description: |-
Specifies which resource from eventTrigger is observed.
required: false
event_trigger_service:
description: |-
The hostname of the service that should be observed.
required: false
event_trigger_retry:
description: |-
If true, the event will be retried if the function returns a failure.
default: false
required: false
deploy_timeout:
description: |-
The function deployment timeout in seconds.
default: 300
required: false
build_worker_pool:
description: |-
Name of the Cloud Build Custom Worker Pool that should be used to build
the function.
required: false
build_environment_variables:
description: |-
Optional list of environment variables that should be available while the
function is built. Note this is different than runtime environment
variables, which should be set with 'env_vars'.
required: false
build_environment_variables_file:
description: |-
Path to a local YAML file containing variables. See 'env_vars_file' for
syntax.
required: false
docker_registry:
description: |-
Registry to use for storing Docker containers. This must be one of
"artifact-registry" or "container-registry".
default: "container-registry"
required: false
docker_repository:
description: |-
User managed repository created in Artifact Registry.
required: false
kms_key_name:
description: |-
Resource name of a Google Cloud KMS crypto key used to encrypt/decrypt
function resources. If specified, you must also provide an artifact
registry repository using the 'docker_repository' field that was created
with the same key.
required: false
outputs:
url:
description: The URL of your Cloud Function. Only available with HTTP Trigger.
id:
description: |-
Full resource name of the Cloud Function, of the format
'projects/p/locations/l/functions/f'.
status:
description: |-
Status of the Cloud Function deployment.
version:
description: |-
Version of the Cloud Function deployment.
runtime:
description: |-
Runtime of the Cloud Function deployment.
branding:
icon: 'code'
color: 'blue'
runs:
using: 'node16'
main: 'dist/index.js'