Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.49 KB

README.md

File metadata and controls

37 lines (24 loc) · 1.49 KB

GitHub Action for Google Cloud Auth

The GitHub Actions for Google Cloud Platform and wraps the gcloud SDK for authorizing a service account. This is a thin wrapper around the gcloud auth command, facilitating providing credentials securely using Secrets.

Usage

Example Workflow file

An example workflow to authenticate with Google Cloud Platform:

workflow "Run gcloud Login" {
  on = "push"
  resolves = "Setup Google Cloud"
}

action "Setup Google Cloud" {
  uses = "actions/gcloud/auth@master"
  secrets = ["GCLOUD_AUTH"]
}

Subsequent actions in the workflow will then be able to use gcloud as that user (see cli for examples).

Secrets

  • GCLOUD_AUTH Required Base64 encoded service account key exported as JSON
    • For information about service account keys please see the Google Cloud docs
    • For information about using Secrets in Actions please see the Actions docs.

Example on encoding from a terminal : base64 ~/<account_id>.json

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. See THIRD_PARTY_NOTICE.md for details.