constellation/.github/actions/login_gcp/action.yml

21 lines
958 B
YAML
Raw Normal View History

name: GCP login
description: "Login to GCP & configure gcloud CLI."
inputs:
2023-01-16 17:15:17 +00:00
service_account:
description: "GCP service account name. Format: <account-name>@<project-name>.iam.gserviceaccount.com"
required: true
runs:
2022-09-14 13:14:26 +00:00
using: "composite"
steps:
2022-09-14 13:14:26 +00:00
# As described at:
# https://github.com/google-github-actions/setup-gcloud#service-account-key-json
- name: Authorize GCP access
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d # v1.0.0
2022-09-14 13:14:26 +00:00
with:
2023-01-16 17:15:17 +00:00
workload_identity_provider: projects/796962942582/locations/global/workloadIdentityPools/constellation-ci-pool/providers/constellation-ci-provider
service_account: ${{ inputs.service_account }}
# Even if preinstalled in Github Actions runner image, this setup does some magic authentication required for gsutil.
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@d51b5346f85640ec2aa2fa057354d2b82c2fcbce # v1.0.1