You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-66Lines changed: 63 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,145 +185,142 @@ If `parent` is set to `false`, it wil be uploaded to `gs://bucket-name/folder2/f
185
185
186
186
## Inputs
187
187
188
-
- `path`- (Required) The path to a file or folder inside the action's
189
-
filesystem that should be uploaded to the bucket.
188
+
<!-- BEGIN_AUTOGEN_INPUTS -->
189
+
190
+
- <a name="project_id"></a><a href="#user-content-project_id"><code>project_id</code></a>: _(Optional)_ Google Cloud project ID to use for billing and API requests. If not
191
+
provided, the project will be inferred from the environment, best-effort.
192
+
To explicitly set the value:
193
+
194
+
```yaml
195
+
project_id: 'my-project'
196
+
```
197
+
198
+
- <a name="universe"></a><a href="#user-content-universe"><code>universe</code></a>: _(Optional, default: `googleapis.com`)_ The Google Cloud universe to use for constructing API endpoints. Trusted
199
+
Partner Cloud and Google Distributed Hosted Cloud should set this to their
200
+
universe address.
201
+
202
+
You can also override individual API endpoints by setting the environment
203
+
variable `GHA_ENDPOINT_OVERRIDE_<endpoint>` where `<endpoint>` is the API
For more information about universes, see the Google Cloud documentation.
212
+
213
+
- <a name="path"></a><a href="#user-content-path"><code>path</code></a>: _(Required)_ The path to a file or folder inside the action's filesystem that should be
214
+
uploaded to the bucket.
190
215
191
216
You can specify either the absolute path or the relative path from the
192
217
action:
193
218
194
219
```yaml
195
-
path: /path/to/file
220
+
path: '/path/to/file'
196
221
```
197
222
198
223
```yaml
199
-
path: ../path/to/file
224
+
path: '../path/to/file'
200
225
```
201
226
202
-
- `destination`- (Required) The destination for the file/folder in the form
203
-
bucket-name or with an optional prefix in the form bucket-name/prefix
227
+
- <a name="destination"></a><a href="#user-content-destination"><code>destination</code></a>: _(Required)_ The destination for the file/folder in the form bucket-name or with an
228
+
optional prefix in the form `bucket-name/prefix`. For example, to upload a
229
+
file named `file` to the GCS bucket `bucket-name`:
204
230
205
231
```yaml
206
-
destination: bucket-name
232
+
destination: 'bucket-name'
207
233
```
208
234
209
-
In the above example, the file will be uploaded to gs://bucket-name/file
235
+
To upload to a subfolder:
210
236
211
237
```yaml
212
-
destination: bucket-name/prefix
238
+
destination: 'bucket-name/prefix'
213
239
```
214
240
215
-
In the above example, the file will be uploaded to
216
-
gs://bucket-name/prefix/file
217
-
218
-
- `gzip`- (Optional) Upload file(s) with gzip content encoding, defaults to
219
-
true.
241
+
- <a name="gzip"></a><a href="#user-content-gzip"><code>gzip</code></a>: _(Optional, default: `true`)_ Upload file(s) with gzip content encoding. To disable gzip
242
+
content-encoding, set the value to false:
220
243
221
244
```yaml
222
245
gzip: false
223
246
```
224
247
225
-
In the above example, the file(s) will be uploaded without `gzip`
226
-
content-encoding
227
-
228
-
- `resumable`- (Optional) Enable resumable uploads, defaults to true.
248
+
- <a name="resumable"></a><a href="#user-content-resumable"><code>resumable</code></a>: _(Optional, default: `true`)_ Enable resumable uploads. To disable resumable uploads, set the value to
249
+
false:
229
250
230
251
```yaml
231
252
resumable: false
232
253
```
233
254
234
-
- `predefinedAcl`- (Optional) Apply a predefined set of access controls to
235
-
the file(s).
255
+
- <a name="predefinedAcl"></a><a href="#user-content-predefinedAcl"><code>predefinedAcl</code></a>: _(Optional)_ Apply a predefined set of access controls to the files being uploaded. For
256
+
example, to grant project team members access to the uploaded files
257
+
according to their roles:
236
258
237
259
```yaml
238
-
predefinedAcl: projectPrivate
260
+
predefinedAcl: 'projectPrivate'
239
261
```
240
262
241
-
In the above example, project team members get access to the uploaded
- <a name="headers"></a><a href="#user-content-headers"><code>headers</code></a>: _(Optional)_ Set object metadata. For example, to set the `Content-Type` header to
269
+
`application/json`and custom metadata with key `custom-field` and value
270
+
`custom-value`:
250
271
251
272
```yaml
252
273
headers: |-
253
-
content-type: application/json
254
-
x-goog-meta-custom-field: custom-value
274
+
content-type: 'application/json'
275
+
x-goog-meta-custom-field: 'custom-value'
255
276
```
256
277
257
-
In the above example, file `Content-Type` will be set to `application/json`
258
-
and custom metadata with key `custom-field` and value `custom-value` will be
All custom metadata fields must be prefixed with `x-goog-meta-`.
282
+
for details. All custom metadata fields must be prefixed with
283
+
`x-goog-meta-`.
268
284
269
-
- `parent`- (Optional) Whether parent dir should be included in GCS
270
-
destination, defaults to true.
285
+
- <a name="parent"></a><a href="#user-content-parent"><code>parent</code></a>: _(Optional, default: `true`)_ Whether the parent directory should be included in GCS destination path. To disable this:
271
286
272
287
```yaml
273
288
parent: false
274
289
```
275
290
276
-
- `glob`- (Optional) Glob pattern.
291
+
- <a name="glob"></a><a href="#user-content-glob"><code>glob</code></a>: _(Optional)_ Glob pattern to match for files to upload.
277
292
278
293
```yaml
279
294
glob: '*.txt'
280
295
```
281
296
282
-
- `concurrency`- (Optional) Number of files to simultaneously upload,
283
-
defaults to 100.
297
+
- <a name="concurrency"></a><a href="#user-content-concurrency"><code>concurrency</code></a>: _(Optional, default: `100`)_ Number of files to simultaneously upload.
284
298
285
299
```yaml
286
-
concurrency: 10
300
+
concurrency: '10'
287
301
```
288
302
289
-
- `process_gcloudignore`- (Optional) Process a `.gcloudignore` file present
290
-
in the top-level of the repository. If true, the file is parsed and any
291
-
filepaths that match are not uploaded to the storage bucket. Defaults to
292
-
true.
303
+
- <a name="process_gcloudignore"></a><a href="#user-content-process_gcloudignore"><code>process_gcloudignore</code></a>: _(Optional, default: `true`)_ Process a `.gcloudignore` file present in the top-level of the repository.
304
+
If true, the file is parsed and any filepaths that match are not uploaded
305
+
to the storage bucket. To disable, set the value to false:
293
306
294
307
```yaml
295
-
process_gcloudignore: true
308
+
process_gcloudignore: false
296
309
```
297
310
298
-
- `project_id`- (Optional) Google Cloud project ID to use for billing and API
299
-
requests. By default, this is extracted from the running environment.
300
311
301
-
```yaml
302
-
project_id: 'my-project'
303
-
```
312
+
<!-- END_AUTOGEN_INPUTS -->
313
+
304
314
305
315
## Outputs
306
316
307
-
List of successfully uploaded file(s).
317
+
<!-- BEGIN_AUTOGEN_OUTPUTS -->
308
318
309
-
For example:
319
+
- `uploaded`: Comma-separated list of files that were uploaded.
0 commit comments