google-github-actions / upload-cloud-storage

A GitHub Action for uploading files to a Google Cloud Storage (GCS) bucket.
https://cloud.google.com/storage
Apache License 2.0
206 stars 49 forks source link

Update README.md headers settable field casing #312

Closed robertvanhoesel closed 1 year ago

robertvanhoesel commented 1 year ago

It is a bit of a gotcha that the headers settable fields are the lowercase counterparts to their Header. The docs incorrectly mention the case sensitive varitions, which when followed causes an error:

 - uses: google-github-actions/upload-cloud-storage@v1
       with:
          path: /foo
          destination: bucket
          headers: |-
            Cache-Control: public, max-age=31536000, no-transform, immutable

google-github-actions/upload-cloud-storage failed with:
invalid header key "Cache-Control" - custom header keys must be prefixed with "x-goog-meta-"

For future users and clarity, I think it is best to update the documentation to use the fully lowercase versions.

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.