Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor gcloud auth action #334

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}