google-github-actions / setup-gcloud

A GitHub Action for installing and configuring the gcloud CLI.
https://cloud.google.com/sdk/docs
Apache License 2.0
1.72k stars 509 forks source link

"No authentication found" warning is thrown when using Application Default Credentials #628

Closed isarkis closed 1 year ago

isarkis commented 1 year ago

TL;DR

We use Application Default Credentials on our self-hosted runners. As such, we don't need to use google-github-actions/auth action. With such set up, google-github-actions/setup-gcloud throws the following warning:

Warning: No authentication found for gcloud, authenticate with google-github-actions/auth

Expected behavior

Warning shouldn't be thrown as we are already authenticated.

Observed behavior

Warning is thrown.

Action YAML

job:
  job_id:
    steps:
    - name: 'Set up Cloud SDK'
      uses: 'google-github-actions/setup-gcloud@v1'

    - name: 'Use gcloud CLI'
      run: 'gcloud info'

Log output

No response

Additional information

No response

sethvargo commented 1 year ago

Duplicate of https://github.com/google-github-actions/setup-gcloud/issues/594