Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update README #241

Merged
merged 2 commits into from Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -32,8 +32,6 @@ again.

This repository uses the [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) branching model.

Use of the [git flow](https://github.com/nvie/gitflow) git extension is recommended.

## Code reviews

All submissions, including submissions by project members, require review. We
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down
68 changes: 49 additions & 19 deletions README.md
Expand Up @@ -12,43 +12,73 @@
License.
-->

# Google Cloud Platform: github-actions
# `setup-gcloud` GitHub Action

This repository contains a library of [Github Actions](https://github.com/actions) providing functionality for working with [Google Cloud Platform](http://cloud.google.com/).
Configures the [Google Cloud SDK][sdk] in the GitHub Actions environment. The Google Cloud SDK includes both the [gcloud][gcloud] and
[gsutil][gsutil] binaries.

## Available Actions
Find other Google Cloud GitHub Actions in [`google-github-actions`](https://github.com/google-github-actions).
bharathkkb marked this conversation as resolved.
Show resolved Hide resolved

* [setup-gcloud](./setup-gcloud/README.md): This action downloads, installs, and configures a [gcloud Cloud SDK](https://cloud.google.com/sdk/) environment for the worker, adding the `gcloud` CLI command to the worker's $PATH.
**This repository also contains deprecated GCP GitHub Actions from previous mono-repo format.**

* [get-secretmanager-secrets](./get-secretmanager-secrets/README.md): This action accesses secrets from [Google Secret Manager](https://cloud.google.com/secret-manager) and makes their results available as output variables.
## Table of Contents

## Example Workflows
* [Usage](#usage)
* [Inputs](#inputs)
* [Example Workflows](#example-workflows)

## Usage

```yaml
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
version: '290.0.1'
averikitsch marked this conversation as resolved.
Show resolved Hide resolved
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true

- name: Use gcloud CLI
run: gcloud info
```

* [Google Kubernetes Engine](./example-workflows/gke/README.md): An example workflow that uses [GitHub Actions][github-action] to deploy a static website to an existing [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/) cluster.
## Inputs

* [Cloud Run](./example-workflows/cloud-run/README.md): An example workflow that uses [GitHub Actions][github-action] to build and deploy a container to [Cloud Run](https://cloud.google.com/run/).
| Name | Requirement | Default | Description |
bharathkkb marked this conversation as resolved.
Show resolved Hide resolved
| ------------- | ----------- | ------- | ----------- |
| `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](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and stored as a [secret](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets). It can be encoded as a [Base64](https://en.wikipedia.org/wiki/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][dac] 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_ | `GITHUB_WORKSPACE` | Only valid when `export_default_credentials` is `true`. Sets the path at which the credentials should be written. |


## Example Workflows

* [Google Compute Engine](./example-workflows/gce/README.md): An example workflow that uses [GitHub Actions](https://help.github.com/en/categories/automating-your-workflow-with-github-actions) to deploy a container to an existing [Google Compute Engine](https://cloud.google.com/compute-engine/) (GCE) instance.
* [Google Kubernetes Engine](./example-workflows/gke/README.md): An example workflow that uses GitHub Actions to deploy a static website to an existing [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/) cluster.

## Feature requests and bug reports
* [Cloud Run](./example-workflows/cloud-run/README.md): An example workflow that uses GitHub Actions to build and deploy a container to [Cloud Run](https://cloud.google.com/run/).

Please file feature requests and bug reports as
[github issues](https://github.com/GoogleCloudPlatform/github-actions/issues).
* [Google Compute Engine](./example-workflows/gce/README.md): An example workflow that uses GitHub Actions to deploy a container to an existing [Google Compute Engine](https://cloud.google.com/compute-engine/) (GCE) instance.

## Community
* [App Engine](./example-workflows/gae/README.md): An example workflow that uses GitHub Actions to deploy source
code to [App Engine](https://cloud.google.com/appengine), a fully managed serverless platform.

The GCP GitHub Actions community uses the **#gcp-github-actions** slack channel on
[https://googlecloud-community.slack.com](https://googlecloud-community.slack.com)
to ask questions and share feedback. Invitation link available here:
[gcp-slack](https://cloud.google.com/community#home-support).
* [Cloud Build](./example-workflows/cloud-build/README.md): An example workflow that uses GitHub Actions to build a container image with [Cloud Build](https://cloud.google.com/cloud-build).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)
See [CONTRIBUTING](CONTRIBUTING.md).

## License

See [LICENSE](LICENSE)
See [LICENSE](LICENSE).


[github-action]:https://help.github.com/en/categories/automating-your-workflow-with-github-actions
[dac]: https://cloud.google.com/docs/authentication/production
[sdk]: https://cloud.google.com/sdk/
[gcloud]: https://cloud.google.com/sdk/gcloud/
[gsutil]: https://cloud.google.com/storage/docs/gsutil
[sa-iam-docs]: https://cloud.google.com/iam/docs/service-accounts
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

name: Set up gcloud Cloud SDK environment
author: GoogleCloudPlatform
author: Google LLC
description: |-
Downloads, installs, and configures a Google Cloud SDK environment.
Adds the `gcloud` CLI command to the $PATH.
Expand Down