Authenticate setup-gcloud with Service Account Key JSON
mainYou can authenticate using a Service Account key stored in a GitHub Secret.
jobs:
job_id:
steps:
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v3'
- name: 'Use gcloud CLI'
run: 'gcloud info'