Closed pratheekrebala closed 1 year ago
Hi @pratheekrebala
The following should work:
uses: google-github-actions/upload-cloud-storage@v1
with:
path: /tmp/acl.yaml
destination: bucket/.acl/
parent: false
This action does not support renaming files before upload, since that would be extremely complex to model for large uploads. If you want more control over the upload, you can use the gsutil
or gcloud storage
commands directly from the Google Cloud SDK instead.
TL;DR
I am unable to use this action to upload a single file to a given path in a bucket. It seems like the package only allows specifying a prefix and not a explicit destination path.
E.g. I am unable to achieve the following:
/tmp/data.yaml
=>gs://bucket/.acl/data.yaml
If I try to run the action with the following variables:
The file is uploaded to:
gs://bucket/.acl/acl.yaml/acl.yaml
instead ofgs://bucket/.acl/acl.yaml
Expected behavior
I would expect that a single file would be uploaded to:
gs://bucket/.acl/acl.yaml
Observed behavior
A file is instead uploaded to:
gs://bucket/.acl/acl.yaml/acl.yaml
Action YAML
Log output
Additional information
This also prevents uploading a static file with a different name. E.g.
/tmp/acl.yaml
=>gs://bucket/.acl/github.yaml
I think the only way to make this work would be:
Then calling the action with
{ path: "/tmp/acl", destination: "gs://bucket/.acl/", parent: false }