deploy-cloudrun icon indicating copy to clipboard operation
deploy-cloudrun copied to clipboard

Cannot pass arguments beginning with a hyphen in --args

Open Pascal-Delange opened this issue 2 years ago • 0 comments

TL;DR

I cannot pass arguments starting with a hyphen (say, -run_server) in the --args. Indeed, it translates it to the gcloud command --args -run_server which then complains about no value found in --args. The correct syntax here would be to translate it to --args=run_server which works.

Expected behavior

flags: --args=-server gets translated to the gcloud argument --args -server, which fails because of the hyphen

Observed behavior

The "=" between --args and the actual args should remain there

Action YAML

- name: Deploy server
     uses: "google-github-actions/deploy-cloudrun@v1"
     with:
       service: service-name
       image: my-image
       region: my-region
       flags: --args="-server"

Log output

No response

Additional information

In the end I just fell back to standard gcloud commands, since I also need to deploy a Cloud Run job anyway.

Pascal-Delange avatar Apr 30 '23 18:04 Pascal-Delange