Skip to content

GitHub Action to setup gcloud cli and log into GCP using federated workload identity

Notifications You must be signed in to change notification settings

vivantehealth/gcloud-workload-identity-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 

Repository files navigation

gcloud-workload-identity-action

Suggested use:

jobs:
  list:
    name: List service accounts
    runs-on: ubuntu-latest
    # GitHub token needs oidc permissions (id-token), which it doesn't get by default
    # Ensure that any other permissions your job needs are also included below
    permissions:
      contents: read
      id-token: write
    steps:
      - name: gcloud setup with workload identity
        uses: vivantehealth/gcloud-workload-identity-action@v3
        with:
          workload_identity_provider: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }}
          gcp_service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
      - name: List accounts
        run: gcloud iam service-accounts list

About

GitHub Action to setup gcloud cli and log into GCP using federated workload identity

Topics

Resources

Stars

Watchers

Forks