{"id":22588980,"url":"https://github.com/matbour/setup-gcloud","last_synced_at":"2025-04-10T21:46:42.399Z","repository":{"id":38426487,"uuid":"222317756","full_name":"matbour/setup-gcloud","owner":"matbour","description":"Install the Google Cloud SDK in your GitHub Actions workflow.","archived":false,"fork":false,"pushed_at":"2022-06-03T23:41:29.000Z","size":33936,"stargazers_count":14,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T21:46:31.027Z","etag":null,"topics":["actions","gcloud","github-actions","google-cloud","google-cloud-sdk"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/setup-google-cloud-sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matbour.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-17T21:57:33.000Z","updated_at":"2025-01-23T03:27:09.000Z","dependencies_parsed_at":"2023-01-11T17:21:32.163Z","dependency_job_id":null,"html_url":"https://github.com/matbour/setup-gcloud","commit_stats":{"total_commits":138,"total_committers":3,"mean_commits":46.0,"dds":"0.10869565217391308","last_synced_commit":"3bb09468aad23fb31bd9e873e87a189d845063c3"},"previous_names":["matbour/setup-gcloud","mathieu-bour/setup-gcloud"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbour%2Fsetup-gcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbour%2Fsetup-gcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbour%2Fsetup-gcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbour%2Fsetup-gcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matbour","download_url":"https://codeload.github.com/matbour/setup-gcloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305867,"owners_count":21081562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","gcloud","github-actions","google-cloud","google-cloud-sdk"],"created_at":"2024-12-08T08:11:46.622Z","updated_at":"2025-04-10T21:46:42.376Z","avatar_url":"https://github.com/matbour.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mathieu-bour/setup-gcloud\n\n![License][license]\n![Stars][stars]\n![Latest release][latest-release]\n![Workflow status][workflow]\n\nInstall the Google Cloud SDK in your GitHub Actions workflow.\n\n**This action is not supported by Google Cloud.**\n\nProudly maintained by [Mathieu Bour][@mathieu-bour], former Vice-CTO [@mathrix-education][@mathrix-education].\n\n## Announcements\n2020/11/20: The [GoogleCloudPlatform official GitHub organization][@GoogleCloudPlatform] has deprecated the\n[setup-gcloud][@GoogleCloudPlatform/github-actions/setup-gcloud] action.\n[@google-github-actions/setup-gcloud][@google-github-actions/setup-gcloud] should be used instead for comparison.\n\n2019/01/27: The [GoogleCloudPlatform official GitHub organization][@GoogleCloudPlatform] has released an official\n[setup-gcloud][@GoogleCloudPlatform/github-actions/setup-gcloud] action.\nCompared to Edutech's one, we provide some additional automation tasks, such as project id discovery and automatic\nDocker Configuration.\n\n## Acknowledgements\nThis action was initially developed for [Education Media SA][@mathrix-education].\nThe repository is now maintained by [@mathieu-bour][@mathieu-bour].\n\n## Motivations\nSince the advent of GitHub Actions, Edutech Media SA has chosen to migrate from Google Cloud Build to this new\ncompilation system.\n\nIf the official [@actions/gcloud][@actions/gcloud] action works perfectly, the fact that it is in two parts\n([auth][@actions/gcloud/auth] and [cli][@actions/gcloud/cli]) and that it is based on Docker makes it slow and not\nvery suitable for launching multiple commands.\n\nSo we chose to create a JavaScript action to fix this problem, also adding additional features, such as Docker\nauthentication with Google Cloud Container Registry.\n\n## Usage\n### Supported operating systems\nThis action currently supports Ubuntu, Mac-OS and Windows based systems.\nThe supported operating system matrix is the following:\n\n| Operating system                  | Status       |\n|-----------------------------------|--------------|\n| `ubuntu-16.04`                    | ![supported] |\n| `ubuntu-18.04` (`ubuntu-latest`)  | ![supported] |\n| `ubuntu-20.04`                    | ![supported] |\n| `macos-10.15` (`macos-latest`)    | ![supported] |\n| `windows-2019` (`windows-latest`) | ![supported] |\n\n\n### Inputs\n| Name                  | Type                            | Default value |\n|-----------------------|---------------------------------|---------------|\n| `version`             | `'latest'` / `local` / `string` | `'latest'`    |\n| `service-account-key` | `string` (base64)               | `''`          |\n| `project`             | `'auto'` / `'none'` / `string`  | `'auto'`      |\n| `components`          | `string`                        | `''`          |\n| `configure-docker`    | `'true'` / `'false'` / `string` | `'false'`     |\n\n#### `version`\nIf you need a precise version of the Google Cloud SDK, you may provide this input.\nBy default, the latest version of the Google Cloud SDK will be downloaded.\nWe strongly advise you to do so since using the latest version may break your workflow if Google release a breaking\nversion.\nIf you prefer using the pre-installed Google Cloud SDK (**ubuntu only**), you may use `local`.\n\n#### `service-account-key`\nTo authenticate the SDK, you may provide a **base64-encoded** service account JSON key.\nIn order to secure you workflow, use GitHub Actions [secrets][actions-secrets].\n\n#### `project`\nBy default, if you provide a `service-account-key`, the action will use it to determine which is the default project.\n\n- If you want to specify a different project (for example, in case of cross-project interaction), you may explicitly\nspecify your project ID here.\n- If you want to disable the project configuration and provide your project ID later in your workflow, set this input\nto `'none'`.\n\n#### `components`\nIf you want to install additional SDK components (for example: `beta` or `gsutil`), you may provide them in this input\nas a comma-separated list.\n\n#### `configure-docker`\nIf you want to push an image to the Google Container Registry, you may authenticate the Docker agent.\nUse `'true'` to authenticate against all the `*.gcr.io` registries, or comma-separated Artifacts Registries.\n\n\n## Examples\nSee [action.yml](action.yml) for details.\n\n### Minimum configuration\n```yaml\n- uses: mathieu-bour/setup-gcloud@main  # WARNING: se the latest stable version instead!\n```\nBy default, the minimal example will install the latest Google Cloud SDK.\nBecause no service account key was provided you will have to authenticate the SDK yourself (for example, with\n[`gcloud auth activate-service-account`][activate-service-account]).\n\n### Typical CI configuration\n```yaml\n- name: Setup Google Cloud SDK\n  uses: mathieu-bour/setup-gcloud@1.3.0\n  with:\n    service-account-key: ${{ secrets.GCLOUD_AUTH }} # base64-encoded service account JSON key\n    confgure-docker: true\n```\nIn this example, you provide a service account key.\nThe action automatically download the latest version of the SDK and authenticates using your key.\n\nThen using the field `\"project_id\"` of your key, we will set the default project using\n`gcloud config set project {project}`, so you do not have to do it later.\n\nFinally, because you may want to build a Docker image and upload it to the\n[Google Container Registry][container-registry], the action will configure Docker to allow the upload of your image.\nMake sure the service account has the correct rights to write on the bucket linked to the registry.\n\n[@mathieu-bour]: https://github.com/mathieu-bour\n[@mathrix-education]: https://github.com/mathrix-education\n[@GoogleCloudPlatform]: https://github.com/GoogleCloudPlatform\n[@actions/gcloud]: https://github.com/actions/gcloud\n[@actions/gcloud/auth]: https://github.com/actions/gcloud/tree/master/auth\n[@actions/gcloud/cli]: https://github.com/actions/gcloud/tree/master/cli\n[@GoogleCloudPlatform/github-actions/setup-gcloud]: https://github.com/GoogleCloudPlatform/github-actions/tree/master/setup-gcloud\n[@google-github-actions/setup-gcloud]: https://github.com/google-github-actions/setup-gcloud\n\n[actions-secrets]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets\n\n[activate-service-account]: https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account\n[artifact-registry]: https://cloud.google.com/artifact-registry\n[container-registry]: https://cloud.google.com/container-registry\n\n[license]: https://img.shields.io/github/license/mathieu-bour/setup-gcloud?style=flat-square\n[stars]: https://img.shields.io/github/stars/mathieu-bour/setup-gcloud?style=flat-square\n[latest-release]: https://img.shields.io/github/v/release/mathieu-bour/setup-gcloud?label=latest%20release\u0026style=flat-square\n[workflow]: https://img.shields.io/github/workflow/status/mathieu-bour/setup-gcloud/Tests?style=flat-square\n[supported]: https://img.shields.io/badge/status-supported-brightgreen?style=flat-square\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatbour%2Fsetup-gcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatbour%2Fsetup-gcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatbour%2Fsetup-gcloud/lists"}