setup-gcloud/setup-gcloud
2019-12-18 09:57:56 -08:00
..
__tests__ Corrected comments in format-url tests 2019-12-17 15:32:47 -08:00
dist Reverted manual changes to generated file, re-ran npm build 2019-12-18 09:57:56 -08:00
src Adjusted format-url to use HTTP HEAD instead of GET to eliminate double downloading. Applied linter and prettier. 2019-12-17 15:25:26 -08:00
.eslintrc.js Adjusted format-url to use HTTP HEAD instead of GET to eliminate double downloading. Applied linter and prettier. 2019-12-17 15:25:26 -08:00
.gitignore Added dist files, skipped tar steps for windows os in tests, increased timeout for installer test 2019-11-07 12:47:11 -08:00
.prettierrc.js switched to DevRel formatting 2019-11-07 16:10:45 -08:00
action.yml Movidied action metadata and docs to reflect optional email param 2019-11-18 11:35:54 -08:00
jest.config.js Imported action v2 impl 2019-11-06 16:47:23 -08:00
package-lock.json Adjusted format-url to use HTTP HEAD instead of GET to eliminate double downloading. Applied linter and prettier. 2019-12-17 15:25:26 -08:00
package.json fix: add @actions/exec library 2019-11-08 13:55:52 -05:00
README.md Update README.md 2019-11-20 21:25:07 -05:00
tsconfig.json Imported action v2 impl 2019-11-06 16:47:23 -08:00
yarn.lock Imported action v2 impl 2019-11-06 16:47:23 -08:00

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: '270.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: 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.