santoshyadavdev / garmin-api

The API to get your data from Garmin Connect
MIT License
2 stars 2 forks source link

Fix GitHub Action to deploy the API to google cloud #2

Open santoshyadavdev opened 2 months ago

santoshyadavdev commented 2 months ago

The Action fails currently, if you are an google cloud expert I would love some help to get it deployed on GKE or APP engine

ChairBorn commented 2 months ago

Your deployment log says:

Run gcloud app deploy --quiet gcloud app deploy --quiet shell: /usr/bin/bash -e {0} env: CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: /home/runner/work/garmin-api/garmin-api/gha-creds-ba7f64ec8c8606dd.json GOOGLE_APPLICATION_CREDENTIALS: /home/runner/work/garmin-api/garmin-api/gha-creds-ba7f64ec8c8606dd.json GOOGLE_GHA_CREDS_PATH: /home/runner/work/garmin-api/garmin-api/gha-creds-ba7f64ec8c8606dd.json CLOUDSDK_CORE_PROJECT: metal-incline-166109 CLOUDSDK_PROJECT: metal-incline-166109 GCLOUD_PROJECT: metal-incline-166109 GCP_PROJECT: metal-incline-166109 GOOGLE_CLOUD_PROJECT: metal-incline-166109 CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud CLOUDSDK_METRICS_ENVIRONMENT_VERSION: [2](https://github.com/santoshyadavdev/garmin-api/actions/runs/10458992629/job/28961979718#step:7:2).1.1 ERROR: (gcloud.app.deploy) Permissions error fetching application [apps/metal-incline-166109]. Please make sure that you have permission to view applications on the project and that App-Engine-Deployer-new@metal-incline-1[6](https://github.com/santoshyadavdev/garmin-api/actions/runs/10458992629/job/28961979718#step:7:6)6109.iam.gserviceaccount.com has the App Engine Deployer (roles/appengine.deployer) role. Error: Process completed with exit code 1.

So I assume there is some problems with permissions for the project on Google's side? Check your IAM Admin project App-Engine-Deployer-new@metal-incline-166109.iam.gserviceaccount.com and assign the App Engine Deployer (roles/appengine.deployer) role to it.

You might wanna try this formatting for G-Cloud config:


- uses: 'google-github-actions/setup-gcloud@v2'
  with:
    project_id: ${{ secrets.GCP_PROJECT_ID }}
    credentials_json: ${{ secrets.GCP_SA_KEY }}
    install_components: 'app-engine-python'
```'