Authenticaton warning when using application default credentials

This issue has been tracked since 2022-11-19.

TL;DR

I'm running a self-hosted GitHub Actions runner on a GKE cluster. Permissions are handled through application default credentials (Workload Identity) and my workflow works correctly (no authorization errors). Unfortunately setup-gcloud still spits out a warning: **Warning**: No authentication found for gcloud, authenticate with google-github-actions/auth.

afbeelding
afbeelding

Expected behavior

I did not expect a warning, considering that the workflow works correctly and interacts with multiple GCP services for which authorization is definitely required.

Observed behavior

An authentication warning is displayed in the workflow logs and as an annotation under the job overview.

Action YAML

name: CICD Bumpversion master
on: 
  push:
    branches:
      - master
    paths:
      - cicd-bumpversion/**
      - .github/workflows/cicd-bumpversion-master.yaml
jobs:
  build-image:
    name: Build and push image
    runs-on: [self-hosted, **REDACTED**]
    steps:
      - name: Set up Cloud SDK
        uses: google-github-actions/[email protected]
      - name: Checkout
        uses: actions/[email protected]
      - name: Build Docker image
        run: docker build -t **REDACTED**/cicd-bumpversion:latest .
        working-directory: cicd-bumpversion/
      - name: Push image to Container Registry
        run: |
          gcloud auth configure-docker
          docker push **REDACTED**/cicd-bumpversion:latest

Log output

No response

Additional information

No response

sethvargo wrote this answer on 2022-11-19

Hi @jorob16

This is correct and this is just a warning. We emit a warning when there are no credentials set by the auth action. This is just a warning and can be safely ignored for your use case.

kkroening wrote this answer on 2022-12-15

this is just a warning

Here's what "just a warning" looks like for anyone hoping to use setup-gcloud in CI - e.g. to install_components: cloud-datastore-emulator for testing:

Warnings

It would be nice if there were a way to disable this message because it drowns out actual actionable information by desensitizing anyone from paying attention to the warning output.

More Details About Repo
Owner Name google-github-actions
Repo Name setup-gcloud
Full Name google-github-actions/setup-gcloud
Language TypeScript
Created Date 2019-11-05
Updated Date 2023-03-23
Star Count 1505
Watcher Count 65
Fork Count 548
Issue Count 11

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date