-
Notifications
You must be signed in to change notification settings - Fork 51
/
action.yml
199 lines (159 loc) · 4.86 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: Cloud Storage Uploader
description: Upload files or folders to GCS buckets
author: Google LLC
inputs:
#
# Google Cloud
# ------------
project_id:
description: |-
Google Cloud project ID to use for billing and API requests. If not
provided, the project will be inferred from the environment, best-effort.
To explicitly set the value:
```yaml
project_id: 'my-project'
```
required: false
universe:
description: |-
The Google Cloud universe to use for constructing API endpoints. Trusted
Partner Cloud and Google Distributed Hosted Cloud should set this to their
universe address.
You can also override individual API endpoints by setting the environment
variable `GHA_ENDPOINT_OVERRIDE_<endpoint>` where `<endpoint>` is the API
endpoint to override. For example:
```yaml
env:
GHA_ENDPOINT_OVERRIDE_oauth2: 'https://oauth2.myapi.endpoint/v1'
```
For more information about universes, see the Google Cloud documentation.
default: 'googleapis.com'
required: false
#
# GCS
# ------------
path:
description: |-
The path to a file or folder inside the action's filesystem that should be
uploaded to the bucket.
You can specify either the absolute path or the relative path from the
action:
```yaml
path: '/path/to/file'
```
```yaml
path: '../path/to/file'
```
required: true
destination:
description: |-
The destination for the file/folder in the form bucket-name or with an
optional prefix in the form `bucket-name/prefix`. For example, to upload a
file named `file` to the GCS bucket `bucket-name`:
```yaml
destination: 'bucket-name'
```
To upload to a subfolder:
```yaml
destination: 'bucket-name/prefix'
```
required: true
gzip:
description: |-
Upload file(s) with gzip content encoding. To disable gzip
content-encoding, set the value to false:
```yaml
gzip: false
```
required: false
default: true
resumable:
description: |-
Enable resumable uploads. To disable resumable uploads, set the value to
false:
```yaml
resumable: false
```
required: false
default: true
predefinedAcl:
description: |-
Apply a predefined set of access controls to the files being uploaded. For
example, to grant project team members access to the uploaded files
according to their roles:
```yaml
predefinedAcl: 'projectPrivate'
```
Acceptable values are: `authenticatedRead`, `bucketOwnerFullControl`,
`bucketOwnerRead`, `private`, `projectPrivate`, `publicRead`. See [the
document](https://googleapis.dev/nodejs/storage/latest/global.html#UploadOptions)
for details.
required: false
headers:
description: |-
Set object metadata. For example, to set the `Content-Type` header to
`application/json` and custom metadata with key `custom-field` and value
`custom-value`:
```yaml
headers: |-
content-type: 'application/json'
x-goog-meta-custom-field: 'custom-value'
```
Settable fields are: `cache-control`, `content-disposition`,
`content-encoding`, `content-language`, `content-type`, `custom-time`. See
[the
document](https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata#settable-fields;-field-values)
for details. All custom metadata fields must be prefixed with
`x-goog-meta-`.
required: false
parent:
description: |-
Whether the parent directory should be included in GCS destination path. To disable this:
```yaml
parent: false
```
required: false
default: true
glob:
description: |-
Glob pattern to match for files to upload.
```yaml
glob: '*.txt'
```
required: false
concurrency:
description: |-
Number of files to simultaneously upload.
```yaml
concurrency: '10'
```
required: false
default: '100'
gcloudignore_path:
description: |-
Path to a gcloudignore file within the repository.
```yaml
gcloudignore_path: '.gcloudignore.dev'
```
required: false
default: '.gcloudignore'
process_gcloudignore:
description: |-
Process a `.gcloudignore` file present in the top-level of the repository.
If true, the file is parsed and any filepaths that match are not uploaded
to the storage bucket. To disable, set the value to false:
```yaml
process_gcloudignore: false
```
required: false
default: true
outputs:
uploaded:
description: |-
Comma-separated list of files that were uploaded.
branding:
icon: 'upload-cloud'
color: 'blue'
runs:
using: 'node20'
main: 'dist/index.js'