Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
__tests__
dist Reverted manual changes to generated file, re-ran npm build Dec 18, 2019
src Google Cloud SDK version 275.0.0 Jan 12, 2020
.eslintrc.js Adjusted format-url to use HTTP HEAD instead of GET to eliminate doub… Dec 17, 2019
.gitignore Added dist files, skipped tar steps for windows os in tests, increase… Nov 7, 2019
.prettierrc.js
README.md Google Cloud SDK version 275.0.0 Jan 12, 2020
action.yml Google Cloud SDK version 275.0.0 Jan 12, 2020
jest.config.js
package-lock.json Adjusted format-url to use HTTP HEAD instead of GET to eliminate doub… Dec 17, 2019
package.json
tsconfig.json Imported action v2 impl Nov 7, 2019
yarn.lock Imported action v2 impl Nov 7, 2019

README.md

setup-gcloud

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:

  1. Downloads a version of the Google Cloud SDK according to the specified version input, as well as the environment OS and architecture.

  2. Installs and caches the downloaded version into the actions environment.

  3. Authenticates the gcloud CLI tool using the inputs: service_account_email and service_account_key. Further information on setting up GCP service accounts can be found here: https://cloud.google.com/iam/docs/service-accounts

Prerequisites

  • This action requires Python 2.7.9 or later to be installed on the environment.

  • A pre-configured GCP service account. More info

Usage

steps:
- uses: actions/checkout@v1
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
  with:
      version: '275.0.0'
      service_account_email: ${{ secrets.GCP_SA_EMAIL }}
      service_account_key: ${{ secrets.GCP_SA_KEY }}
- run: gcloud info

Inputs

  • version: The version of the gcloud to be installed. Example: 275.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.

You can’t perform that action at this time.