You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I configured workflow yaml and expecting it automatically run gcloud run deploy command, an error occured says that some options, such as --source , --vpc-connector, are not recognized.
I found that the options of gcloud run in setup-cloud@v0 seems different than current official gcloud run[1]
# Setup gcloud CLI# https://github.com/google-github-actions/setup-gcloud
- uses: google-github-actions/setup-gcloud@v0with:
version: '286.0.0'service_account_email: ${{ secrets.GCP_SA_EMAIL }}service_account_key: ${{ secrets.GCP_SA_KEY }}project_id: ${{ secrets.GCP_PROJECT_ID }}export_default_credentials: true# Print gcloud info
- name: Inforun: gcloud info# Deploy to cloud run
- name: Deployrun: |- gcloud run deploy server --source . \ --set-env-vars DATABASE_URL=mysql://root:[email protected]:3306/parachute \ --vpc-connector=projects/parachute-344120/locations/us-east4/connectors/parachute-server \ --region=us-east4
Log output
Run gcloud run deploy server --source . \
gcloud run deploy server --source . \
--set-env-vars DATABASE_URL=***10.96.176.3:3306/mydb \
--vpc-connector=projects/***/locations/us-east4/connectors/server \
--region=us-east4
shell: /usr/bin/bash -e ***0***
env:
CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud
GCLOUD_PROJECT: ***
GOOGLE_APPLICATION_CREDENTIALS: /home/runner/work/server/server/9bca1a4caa2478ef5a970bfa
GOOGLE_GHA_CREDS_PATH: /home/runner/work/server/server/9bca1a4caa2478ef5a970bfa
ERROR: (gcloud.run.deploy) unrecognized arguments:
--source
.
--vpc-connector=projects/***/locations/us-east4/connectors/server (did you mean '--connectivity'?)
To search the help text of gcloud commands, run:
gcloud help -- SEARCH_TERMS
Error: Process completed with exit code 2.
Additional information
No response
The text was updated successfully, but these errors were encountered:
@fbukevin You are using an old version of the gcloud sdk by setting the version: '286.0.0' property. Can you remove the version flag to use the latest?
Also, we have an action specific to deploying Cloud Run. You can check it out here.
NOTE: You can use the --flags property to add --vpc-connector for the Cloud Run action.
Also, if you want to keep a static version with gcloud, you will need at least version 354.0.0 to use the --source command with gcloud (prior to this you would need the beta command).
@verbanicm
Ah, thanks for reminding me. I thought that replacing @master with v0 makes it use the latest version.
I fixed it by replacing version.
I will consider using deploy-cloudrun.
Thanks for your help!
TL;DR
When I configured workflow yaml and expecting it automatically run
gcloud run deploy
command, an error occured says that some options, such as--source
,--vpc-connector
, are not recognized.I found that the options of
gcloud run
in setup-cloud@v0 seems different than current officialgcloud run
[1]setup-cloud@v0
official
[1] https://cloud.google.com/sdk/gcloud/reference/run/deploy#--source
Expected behavior
No response
Observed behavior
No response
Action YAML
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: