4141
4242 - name : ' Set up Cloud SDK'
4343 uses : ' google-github-actions/setup-gcloud@v1'
44+ with :
45+ version : ' >= 363.0.0'
4446
4547 - name : ' Use gcloud CLI'
4648 run : ' gcloud info'
@@ -50,13 +52,42 @@ jobs:
5052
5153### Cloud SDK inputs
5254
53- - ` version`: (Optional) A string representing the version of the Cloud SDK
54- (`gcloud`) to install (e.g. `"290.0.1"`). The default value is "latest",
55- which will install the latest available Cloud SDK version.
55+ - ` skip_install`: (Optional) Skip the `gcloud` installation and use the
56+ [system-installed gcloud][github-runners] instead. This can dramatically
57+ improve workflow speeds at the expense of a slightly older gcloud version.
58+ Setting this to `true` ignores any value for the `version` input. Even if
59+ installation is skipped, this GitHub Action will still configure any
60+ components or project metadata. The default value is `false`.
61+
62+ - `version` : (Optional) A string representing the version or version
63+ constraint of the Cloud SDK (`gcloud`) to install (e.g. `"290.0.1"` or `">=
64+ 197.0.1"`). The default value is `"latest"`, which will always download and
65+ install the latest available Cloud SDK version.
66+
67+ ` ` ` yaml
68+ - uses: 'google-github-actions/setup-gcloud@v1'
69+ with:
70+ version: '>= 416.0.0'
71+ ` ` `
72+
73+ If there is no installed `gcloud` version that matches the given constraint,
74+ this GitHub Action will download and install the latest available version
75+ that still matches the constraint.
5676
5777 **Warning!** Workload Identity Federation requires version
5878 [363.0.0](https://cloud.google.com/sdk/docs/release-notes#36300_2021-11-02)
59- or newer.
79+ or newer. If you need support for Workload Identity Federation, specify your
80+ version constraint as such :
81+
82+ ` ` ` yaml
83+ - uses: 'google-github-actions/setup-gcloud@v1'
84+ with:
85+ version: '>= 363.0.0'
86+ ` ` `
87+
88+ You are responsible for ensuring the `gcloud` version matches the features
89+ and components required. See the [gcloud release
90+ notes][gcloud-release-notes] for a full list of versions.
6091
6192- `project_id` : (Optional) Project ID (**not** project _number_) of the Google
6293 Cloud project. If provided, this will configure the `gcloud` CLI to use that
@@ -233,3 +264,5 @@ See [LICENSE](LICENSE).
233264[sa-iam-docs] : https://cloud.google.com/iam/docs/service-accounts
234265[sa] : https://cloud.google.com/iam/docs/creating-managing-service-accounts
235266[wif] : https://cloud.google.com/iam/docs/workload-identity-federation
267+ [github-runners] : https://github.com/actions/runner-images
268+ [gcloud-release-notes] : https://cloud.google.com/sdk/docs/release-notes
0 commit comments