deploy-cloudrun
deploy-cloudrun copied to clipboard
Cloud run job issue with parsing flags
TL;DR
This GHA replaces =
separated flags with space separate flags, which can cause parsing issues.
Expected behavior
If I add in the flags --command=python --args='-m,job.main'
, the output gcloud command should also be =
separated, which would result in a successful deploy.
Observed behavior
The =
gets replaced by a space by GHA, and the resultant flag sent to gcloud looks like --command python --args -m,job.main
. That leading dash for -m
causes a shell parsing error, which looks like:
ERROR: (gcloud.run.jobs.deploy) argument --args: expected one argument
Action YAML
- name: Deploy to Cloud Run
uses: google-github-actions/deploy-cloudrun@v2
with:
job: test
region: us-east1
flags: --command=python --args=-m,job.main
Log output
Error: google-github-actions/deploy-cloudrun failed with: failed to execute gcloud command `gcloud run jobs deploy test ... --command python --args -m,job.main`: ERROR: (gcloud.run.jobs.deploy) argument --args: expected one argument
Additional information
This is only an issue if the first arg starts with a dash