This action configures the Google Cloud SDK in the environment for use in actions. The Google Cloud SDK includes both the gcloud and gsutil binaries.
It does the following:
-
Downloads a version of the Google Cloud SDK according to the specified
version
input, as well as the environment OS and architecture. -
Installs and caches the downloaded version into the actions environment.
-
Authenticates the gcloud CLI tool using the inputs:
service_account_email
andservice_account_key
. Further information on setting up GCP service accounts can be found here: https://cloud.google.com/iam/docs/service-accounts
-
This action requires Python 2.7.9 or later to be installed on the environment.
-
A pre-configured GCP service account. More info
steps:
- uses: actions/checkout@v1
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- run: gcloud info
-
version
: The version of the gcloud to be installed. Example:270.0.0
-
service_account_email
: (Optional) The service account email which will be used for authentication. -
service_account_key
: The service account key which will be used for authentication. This key should be created, encoded as a Base64 string (eg.cat my-key.json | base64
on macOS), and stored as a secret.