Skip to content

add a skip_auth_check input - #737

Open
rootkiller6788 wants to merge 2 commits into
google-github-actions:mainfrom
rootkiller6788:feat-skip-auth-check
Open

rootkiller6788 wants to merge 2 commits into
google-github-actions:mainfrom
rootkiller6788:feat-skip-auth-check

Conversation

@rootkiller6788

Copy link
Copy Markdown

This adds a skip_auth_check input, 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: true we don't call isAuthenticated() 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 test is 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.

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.
@rootkiller6788
rootkiller6788 marked this pull request as ready for review October 5, 2026 05:58
@rootkiller6788
rootkiller6788 requested a review from a team as a code owner October 5, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant