actions-hub / gcloud

GitHub Action for interacting with Google Cloud Platform (GCP)
https://github.com/marketplace/actions/google-cloud-platform-gcp-cli-gcloud
MIT License
229 stars 28 forks source link

Using cache-control as a header fails the build #8

Closed kerrmarin closed 4 years ago

kerrmarin commented 4 years ago

A simple workflow with a step like:

      - name: Upload to Google Cloud
        uses: actions-hub/gcloud@master
        env:
          PROJECT_ID: my-project-id
          APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
          CLI: gsutil
        with:
          args: -h "Cache-Control:public, max-age=86400" -m cp -r docs/** gs://my-bucket/${{ env.GITHUB_REF_SLUG }}

Fails with CommandException: Invalid command "max-age=86400".

The same command works if -h "Cache-Control:public, max-age=86400" is omitted.

Following the docs here it appears that this should work?

exelban commented 4 years ago

@kerrmarin fast solution, try to use single quotes: -h 'Cache-Control:public, max-age=86400'. I will fix it in free time.

kerrmarin commented 4 years ago

@exelban thank you for the quick response, that worked 👍