forked from scstorytel/deploy-cloudrun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
180 lines (156 loc) · 6.51 KB
/
action.yml
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
# 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: Deploy to Cloud Run
author: Google LLC
description: |-
Use this action to deploy a container in the Google Container Registry to Cloud Run.
inputs:
image:
description: |-
Name of the container image to deploy (e.g. gcr.io/cloudrun/hello:latest).
Required if not using a service YAML.
required: false
service:
description: |-
ID of the service or fully qualified identifier for the service.
Required if not using a service YAML.
required: false
region:
description: |-
Region in which the resource can be found.
required: false
default: us-central1
env_vars:
description: |-
List of key-value pairs to set as environment variables in the format:
KEY1=VALUE1,KEY2=VALUE2. Existing environment variables will be retained.
If both "env_vars" and "env_vars_file" are specified, the keys in
"env_vars" will take precendence over the keys in "env_vars_files".
required: false
env_vars_file:
description: |-
Path to a file on disk, relative to the workspace, that defines
environment variables. The file can be newline-separated KEY=VALUE pairs,
JSON, or YAML format. If both "env_vars" and "env_vars_file" are
specified, the keys in "env_vars" will take precendence over the keys in
"env_vars_files".
required: false
secrets:
description: |-
List of key-value pairs to set as either environment variables or mounted
volumes in the format:
KEY1=secret-key-1:latest,/secrets/api/key=secret-key-2:latest. Existing
secrets will be retained.
required: false
labels:
description: |-
List of key-value pairs to set as labels of cloud run service in the format:
KEY1=VALUE1,KEY2=VALUE2. Existing labels will be retained.
required: false
skip_default_labels:
description: |-
Skip applying the special annotation labels that indicate the deployment
came from GitHub Actions.
required: false
default: false
metadata:
description: |-
YAML service description for the Cloud Run service.
required: false
project_id:
description: |-
The Google Cloud Project ID. If unset, this is inherited from the environment.
required: false
source:
description: |-
The location of the source to build. The location can be a directory on
a local disk or a gzipped archive file (.tar.gz) in Google Cloud Storage.
The role `Cloud Build Service Account` is required.
required: false
suffix:
description: |-
Specify the suffix of the revision name. Revision names always start with
the service name automatically. For example, specifying 'v1' for a service
named 'helloworld', would lead to a revision named 'helloworld-v1'.
required: false
tag:
description: |-
Traffic tag to assign to the newly created revision.
required: false
timeout:
description: |-
Set the maximum request execution time. It is specified as a duration; for
example, "10m5s" is ten minutes and five seconds. If you don't specify a
unit, seconds is assumed.
required: false
no_traffic:
description: |-
True to avoid sending traffic to the revision being deployed. Setting
this flag assigns any traffic assigned to the LATEST revision to the
specific revision bound to LATEST before the deployment. The effect is
that the revision being deployed will not receive traffic. After a
deployment with this flag the LATEST revision will not receive traffic
on future deployments.
default: false
required: false
revision_traffic:
description: |-
Comma separated list of traffic assignments in the form REVISION-NAME=PERCENTAGE.
REVISION-NAME must be the name for a revision for the service as returned
by 'gcloud beta run list revisions'. PERCENTAGE must be an integer
percentage between 0 and 100 inclusive.
Ex service-nw9hs=10,service-nw9hs=20 Up to 100 percent of traffic may be
assigned. If 100 percent of traffic is assigned, the Service traffic is
updated as specified. If under 100 percent of traffic is assigned, the
Service traffic is updated as specified for revisions with assignments and
traffic is scaled up or down down proportionally as needed for revision
that are currently serving traffic but that do not have new assignments.
required: false
tag_traffic:
description: |-
Comma separated list of traffic assignments in the form TAG=PERCENTAGE.
TAG must match a traffic tag on a revision of the service. PERCENTAGE must
be an integer percentage between 0 and 100 inclusive. Up to 100 percent of
traffic may be assigned. If 100 percent of traffic is assigned, the service
traffic is updated as specified. If under 100 percent of traffic is
assigned, the service traffic is updated as specified to the given tags,
and other traffic is scaled up or down proportionally.
required: false
flags:
description: |-
Space separated list of other Cloud Run flags, examples can be found:
https://cloud.google.com/sdk/gcloud/reference/run/deploy#FLAGS. Ex
[email protected] --concurrency=10
required: false
gcloud_version:
description: |-
Version of the Cloud SDK to install. If unspecified or set to "latest",
the latest available gcloud SDK version for the target platform will be
installed. Example: "290.0.1".
required: false
gcloud_component:
description: |-
Version of the Cloud SDK components to install and use. If unspecified, the latest
or released version will be used. This is the equivalent of running
'gcloud alpha run' or 'gcloud beta run'. Valid values are `alpha` or `beta`.
required: false
outputs:
url:
description: The URL of your Cloud Run service
branding:
icon: 'chevrons-right'
color: 'blue'
runs:
using: 'node16'
main: 'dist/main/index.js'