No description
Find a file
Seth Vargo 0b8ec28b66
Run run ci instead of npm install in release please (#407)
This should ensure the lockfile doesn't change
2021-11-30 16:06:48 -06:00
.github Run run ci instead of npm install in release please (#407) 2021-11-30 16:06:48 -06:00
dist feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
example-workflows Fix broken README links (#406) 2021-11-30 13:22:54 -08:00
src feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
tests feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
.eslintrc.js feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
.gitignore feat: cleanup old actions(#331) 2021-07-23 13:24:52 -05:00
.prettierrc.js feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
action.yml feat: cleanup old actions(#331) 2021-07-23 13:24:52 -05:00
CHANGELOG.md feat: cleanup old actions(#331) 2021-07-23 13:24:52 -05:00
CODEOWNERS chore: Create CODEOWNERS (#268) 2021-02-12 11:16:36 -06:00
CONTRIBUTING.md docs: update README (#241) 2020-11-18 11:33:53 -08:00
LICENSE docs: update README (#241) 2020-11-18 11:33:53 -08:00
package-lock.json feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
package.json feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
README.md feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00
tsconfig.json feat: Export credentials into RUNNER_TEMP instead of GITHUB_WORKSPACE (#405) 2021-11-30 16:04:23 -06:00

setup-gcloud GitHub Action

Configures the Google Cloud SDK in the GitHub Actions environment. The Google Cloud SDK includes both the gcloud and gsutil binaries.

Or integrate natively with other Google Cloud GitHub Actions:

📢 NOTICE

Previously this repository contained the code for ALL of the GCP GithHub Actions. Now each action has it's own repo and this repo is only for setup-gcloud

Use google-github-actions/setup-gcloud

steps:
 - id: gcloud
-  uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
+  uses: google-github-actions/setup-gcloud@master

Or google-github-actions/{action}

steps:
 - id: deploy
-  uses: GoogleCloudPlatform/github-actions/deploy-cloudrun@master
+  uses: google-github-actions/deploy-cloudrun@main

Table of Contents

Usage

- name: Set up Cloud SDK
  uses: google-github-actions/setup-gcloud@master
  with:
    project_id: ${{ secrets.GCP_PROJECT_ID }}
    service_account_key: ${{ secrets.GCP_SA_KEY }}
    export_default_credentials: true

- name: Use gcloud CLI
  run: gcloud info

Inputs

Name Requirement Default Description
version optional latest The version of the gcloud to be installed. Example: 290.0.1
project_id optional ID of the Google Cloud Platform project. If provided, this will configure gcloud to use this project ID by default for commands. Individual commands can still override the project using the --project flag which takes precedence.
service_account_key optional The service account key which will be used for authentication credentials. This key should be created and stored as a secret. It can be encoded as a Base64 string or as JSON.
service_account_email optional Service account email address to use for authentication. This is required for legacy .p12 keys but can be omitted for JSON keys. This is usually of the format <name>@<project-id>.iam.gserviceaccount.com.
export_default_credentials optional false Exports the path to Default Application Credentials as the environment variable GOOGLE_APPLICATION_CREDENTIALS to be available in later steps. Google Cloud services automatically use this environment variable to find credentials.
credentials_file_path optional (temporary file) Only valid when export_default_credentials is true. Sets the path at which the credentials should be written. WARNING: If you write credentials outside of the GitHub Actions temporary path, they may be cached on self-hosted runners and exposed in future runs! See Sharing Credentials for more information.

Example Workflows

Sharing Credentials

If export_default_credentials is true, this GitHub Action will automatically export the credentials to be available in future steps in the job. By default, the credentials are exported to a temporary file that is automatically cleaned up when the job finishes. This file is available to all steps in the job.

If you want to export credentials to be available to all jobs in a workflow, you can choose a custom credentials_file_path that resides in GITHUB_WORKSPACE. However, we do NOT recommend this approach, as this directory is not automatically cleaned up and can leak credentials files over time.

Contributing

See CONTRIBUTING.

License

See LICENSE.