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
232 stars 27 forks source link

Error Cannot get cloud region in global job #24

Closed jsigee87 closed 3 years ago

jsigee87 commented 3 years ago

Hello, I have been successfully using this action for some time and I am suddenly getting an error as of yesterday. Neither the GitHub actions yaml nor the GAE app.yaml have been changed for 14 days.

The error from the build log is:

Detect credentials from previous session...
APPLICATION_CREDENTIALS found. Setting up a credentials....
APPLICATION_CREDENTIALS is Base64 Encoded
Activated service account credentials for: [github-actions-sa-dev@***.iam.gserviceaccount.com]
Previous project id not detected
Updated property [core/project].
Services to deploy:

descriptor:      [/github/workspace/app/app.yaml]
source:          [/github/workspace/app]
target project:  [***]
target service:  [default]
target version:  [20210204t103742]
target url:      [https://***.uc.r.appspot.com]

Do you want to continue (Y/n)?  
Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 11 files to Google Cloud Storage               ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...
.........................................................................................................................................................................................................................................failed.
ERROR: (gcloud.app.deploy) Error Response: [5] Cannot get cloud region in global job.

The section of the GitHub actions yaml file that creates this log is:

- name: Deploy
  uses: actions-hub/gcloud@master
  env:
    APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DEV }}
    PROJECT_ID: ${{ secrets.PROJECT_ID_DEV }}
  with:
    args: "app deploy app/app.yaml --project=${{ secrets.PROJECT_ID_DEV }}"

The app.yaml is:

runtime: python37
entrypoint: gunicorn -t 120 -b :$PORT main:app

handlers:
  - url: /.*
    secure: always
    script: auto
env_variables:
  REGION: "us-central1"
  EMAIL_FUNCTION: "sendEmailSMTP"

Let me know if I can provide any more information to be helpful.

exelban commented 3 years ago

Hi. I suppose it's related to the new version of gcloud. Which was released yesterday.

Could you try to use 325.0.0 instead of master?

sundhar010 commented 3 years ago

Found this https://stackoverflow.com/questions/66044715/error-gcloud-app-deploy-error-response-5-cannot-get-cloud-region-in-global

exelban commented 3 years ago

Yeap, as I was thinking. It's related to the GCP, not gcloud.