Skip to content

Commit

Permalink
refactor gcloud auth action
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmellos committed Nov 13, 2024
1 parent 5275467 commit ef4a89e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/actions/gcloud-auth/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ outputs:
description: 'Access token from GCLOUD'

inputs:
TOKEN_FORMAT:
default: id_token
description: 'The default token format generated when authenticating.'
GCP_WIP:
default: ""
description: 'The workload identity provider.'
PROJECT_ID:
default: ""
description: 'The project associated with the workload identity provider.'
runs:
using: composite
steps:
- id: auth
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
uses: 'google-github-actions/auth@v2.1.6'
with:
token_format: ${{ inputs.TOKEN_FORMAT }}
workload_identity_provider: ${{ env.GCP_WIP }}
service_account: ${{ env.GCP_SA }}
workload_identity_provider: ${{ inputs.GCP_WIP }}
project_id: ${{ inputs.PROJECT_ID }}

0 comments on commit ef4a89e

Please sign in to comment.