google-github-actions / auth

A GitHub Action for authenticating to Google Cloud.
https://cloud.google.com/iam
Apache License 2.0
969 stars 196 forks source link

Update documentation: `token_format` is actually optional #361

Closed dlouvier closed 12 months ago

dlouvier commented 12 months ago

The README documentation is misleading because it states token_format is required however it is not

This caused me some confusion and unnecessary testing because I was configuring access_token_lifetime while I didn't have configure token_format at all, so any change was completely ignore, because no token was generated.

sethvargo commented 12 months ago

The value is required in order to generate OAuth 2.0 access tokens. Your PR changes documentation that is under the header "Inputs for generating OAuth 2.0 access tokens", and setting token_format to "access_token" is required when generating OAuth 2.0 access tokens.

Since generating an OAuth 2.0 access token (or OIDC token) is not required to use the GitHub Action, the input is optional in the action.yml. It's "conditionally-required", and the documentation is correct for the section in this PR.