Repository navigation
add a skip_auth_check input - #737
Open
rootkiller6788 wants to merge 2 commits into
Open
rootkiller6788 wants to merge 2 commits into
rootkiller6788 wants to merge 2 commits into
Conversation
Jobs that only need the gcloud CLI, e.g. to drive the Firestore or Spanner emulator, never authenticate, so they get the "not authenticated" warning on every run. Add an opt-out: with skip_auth_check we don't probe gcloud at all and we don't warn. Credentials from google-github-actions/auth are still loaded, the flag only skips the check.
Also pins the existing behaviour: without a credential file and with nothing authenticated, the warning is emitted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
skip_auth_checkinput, which is the opt-out asked for in #731.If a job only needs the gcloud CLI on the PATH (the Firestore/Spanner emulator case), it never authenticates, so the action prints "The gcloud CLI is not authenticated" on every run. With
skip_auth_check: truewe don't callisAuthenticated()at all and we don't warn.I deliberately skipped only the check, not authentication itself: if google-github-actions/auth ran and set
GOOGLE_GHA_CREDS_PATH, the credentials are still loaded. The default is false, so nothing changes for existing users.There are unit tests for the three cases: warning by default, no probe and no warning with the flag, and still authenticating when a credential file is present.
npm testis 16/16 and eslint is clean.I left the README alone since it is generated at release time, but I can include it if you prefer.