Compare commits

...

2 commits

Author SHA1 Message Date
Seth Vargo
fc2174804b
Update README with correct Node version (#515)
Closes https://github.com/google-github-actions/auth/issues/514

Signed-off-by: Seth Vargo <seth@sethvargo.com>
2025-09-03 09:38:45 -04:00
Seth Vargo
0dfce0c0f8
Update README to reference v3 (#511) 2025-08-28 14:55:07 -04:00
3 changed files with 16 additions and 16 deletions

View file

@ -39,7 +39,7 @@ support](https://cloud.google.com/support).**
gha-creds-*.json gha-creds-*.json
``` ```
- This action runs using Node 20. Use a [runner - This action runs using Node 24. Use a [runner
version](https://github.com/actions/virtual-environments) that supports this version](https://github.com/actions/virtual-environments) that supports this
version of Node or newer. version of Node or newer.
@ -60,7 +60,7 @@ jobs:
steps: steps:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
project_id: 'my-project' project_id: 'my-project'
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
@ -249,7 +249,7 @@ regardless of the authentication mechanism.
job_id: job_id:
steps: steps:
- uses: 'actions/checkout@v4' # Must come first! - uses: 'actions/checkout@v4' # Must come first!
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
``` ```
- `export_environment_variables`: (Optional) If true, the action will export - `export_environment_variables`: (Optional) If true, the action will export
@ -434,7 +434,7 @@ These instructions use the [gcloud][gcloud] command-line tool.
Actions YAML: Actions YAML:
```yaml ```yaml
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
project_id: 'my-project' project_id: 'my-project'
workload_identity_provider: '...' # "projects/123456789/locations/global/workloadIdentityPools/github/providers/my-repo" workload_identity_provider: '...' # "projects/123456789/locations/global/workloadIdentityPools/github/providers/my-repo"
@ -598,7 +598,7 @@ These instructions use the [gcloud][gcloud] command-line tool.
Actions YAML: Actions YAML:
```yaml ```yaml
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
service_account: '...' # my-service-account@my-project.iam.gserviceaccount.com service_account: '...' # my-service-account@my-project.iam.gserviceaccount.com
workload_identity_provider: '...' # "projects/123456789/locations/global/workloadIdentityPools/github/providers/my-repo" workload_identity_provider: '...' # "projects/123456789/locations/global/workloadIdentityPools/github/providers/my-repo"
@ -667,7 +667,7 @@ These instructions use the [gcloud][gcloud] command-line tool.
the GitHub Actions YAML: the GitHub Actions YAML:
```yaml ```yaml
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' # Replace with the name of your GitHub Actions secret credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' # Replace with the name of your GitHub Actions secret
``` ```

View file

@ -20,7 +20,7 @@ jobs:
id-token: 'write' id-token: 'write'
- id: 'auth' - id: 'auth'
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@v3'
with: with:
project_id: 'my-project' project_id: 'my-project'
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
@ -45,7 +45,7 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
project_id: 'my-project' project_id: 'my-project'
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
@ -56,7 +56,7 @@ jobs:
# the service account, specify the 'token_format' parameter and use the # the service account, specify the 'token_format' parameter and use the
# 'accesss_token' output. # 'accesss_token' output.
# #
# - uses: 'google-github-actions/auth@v2' # - uses: 'google-github-actions/auth@v3'
# with: # with:
# workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' # workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
# service_account: 'my-service-account@my-project.iam.gserviceaccount.com' # service_account: 'my-service-account@my-project.iam.gserviceaccount.com'
@ -79,7 +79,7 @@ jobs:
steps: steps:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
``` ```
@ -100,7 +100,7 @@ jobs:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- id: 'auth' - id: 'auth'
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@v3'
with: with:
project_id: 'my-project' project_id: 'my-project'
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
@ -136,7 +136,7 @@ jobs:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- id: 'auth' - id: 'auth'
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@v3'
with: with:
token_format: 'access_token' # <-- token_format: 'access_token' # <--
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
@ -173,7 +173,7 @@ jobs:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- id: 'auth' - id: 'auth'
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@v3'
with: with:
token_format: 'id_token' # <-- token_format: 'id_token' # <--
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
@ -223,7 +223,7 @@ jobs:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- id: 'auth' - id: 'auth'
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@v3'
with: with:
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
service_account: 'my-service-account@my-project.iam.gserviceaccount.com' service_account: 'my-service-account@my-project.iam.gserviceaccount.com'

View file

@ -27,7 +27,7 @@
```yaml ```yaml
steps: steps:
- uses: 'actions/checkout@v4' - uses: 'actions/checkout@v4'
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
``` ```
1. Ensure the value for `workload_identity_provider` is the full _Provider_ 1. Ensure the value for `workload_identity_provider` is the full _Provider_
@ -266,7 +266,7 @@ Alternatively, you can use the `token_format` parameter of this action to
generate an ID token directly: generate an ID token directly:
```yaml ```yaml
- uses: 'google-github-actions/auth@v2' - uses: 'google-github-actions/auth@v3'
with: with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }} workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }} service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}