Proposed update to gcloud storage tool with cache_control and additional tags
Proposing to update the gsutil rsync tool to the gcloud storage rsync tool for greater flexibility of metadata tags. I've done a translation of syntax based on the equivalent commands in the docs.
For my use case, I have been hosting a publicly accessible static website using google storage, and rapidly updating it as a preview during development. Google cloud by default sets cache-control on public buckets to 1 hour, so I have to either manually clear the cache or wait 1 hour to see the changes in the bucket. The gsync utility erases the cache-control metadata tag whenever it syncs files.
If I can use the gcloud storage utility to run the sync actions on push, I can programmatically control the metadata tags I want to include as well.
I'm new to working with GCP storage programmatically, so let me know if I'm missing anything here and there is a simpler path to the intended outcome.
Hi @psaul20 Thanks for your pull request, right now I have no option to test it so it could take a bit longer to review and release it. Do you really want to sync all you're files all the time? Right now I just worked locally all the time until I got to a point when I did want to release my changes.
Hi @patrickwyler thanks for reviewing! Can you clarify your questions about syncing files all the time? Are you referring to the caching behavior? I am not continously syncing my files, the action still only runs on push to the specified branch per your original action.yml configuration.
My addition is simply providing more control over the syncing action available via gcloud storage tags, such as setting the caching behavior of the uploaded files (see docs for other available tags)
For reference, I am currently using it successfully on my personal static website
If you believe this is a valuable addition, let me know if there is anything I can do to help test!