Skip to content

Commit 012c5df

Browse files
authored
Update deps and switch to autodoc (#690)
1 parent 744a572 commit 012c5df

5 files changed

Lines changed: 280 additions & 299 deletions

File tree

README.md

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -56,61 +56,64 @@ jobs:
5656
5757
## Inputs
5858
59-
### Cloud SDK inputs
60-
61-
- `skip_install`: (Optional) Skip the `gcloud` installation and use the
62-
[system-installed gcloud][github-runners] instead. This can dramatically
63-
improve workflow speeds at the expense of a slightly older gcloud version.
64-
Setting this to `true` ignores any value for the `version` input. If you
65-
skip installation, you will be unable to install components because the
66-
system-install gcloud is locked. The default value is `false`. ⚠️ Be aware
67-
that GitHub [plans to remove](https://github.com/actions/runner-images/issues/7101)
68-
the system-installed gcloud, and any workflows with `skip_install: true`
69-
will stop working when that happens.
70-
71-
- `version`: (Optional) A string representing the version or version
72-
constraint of the Cloud SDK (`gcloud`) to install (e.g. `"290.0.1"` or `">=
73-
197.0.1"`). The default value is `"latest"`, which will always download and
74-
install the latest available Cloud SDK version.
75-
76-
```yaml
77-
- uses: 'google-github-actions/setup-gcloud@v2'
78-
with:
79-
version: '>= 416.0.0'
80-
```
59+
<!-- BEGIN_AUTOGEN_INPUTS -->
60+
61+
- <a name="version"></a><a href="#user-content-version"><code>version</code></a>: _(Optional, default: `latest`)_ A string representing the version or version constraint of the Cloud SDK
62+
(`gcloud`) to install (e.g. `"290.0.1"` or `">= 197.0.1"`). The default
63+
value is `"latest"`, which will always download and install the latest
64+
available Cloud SDK version.
8165

82-
If there is no installed `gcloud` version that matches the given constraint,
83-
this GitHub Action will download and install the latest available version
84-
that still matches the constraint.
66+
- uses: 'google-github-actions/setup-gcloud@v2'
67+
with:
68+
version: '>= 416.0.0'
8569

86-
**Warning!** Workload Identity Federation requires version
70+
If there is no installed `gcloud` version that matches the given
71+
constraint, this GitHub Action will download and install the latest
72+
available version that still matches the constraint.
73+
74+
Authenticating via Workload Identity Federation requires version
8775
[363.0.0](https://cloud.google.com/sdk/docs/release-notes#36300_2021-11-02)
88-
or newer. If you need support for Workload Identity Federation, specify your
89-
version constraint as such:
76+
or newer. If you need support for Workload Identity Federation, specify
77+
your version constraint as such:
9078

91-
```yaml
92-
- uses: 'google-github-actions/setup-gcloud@v2'
93-
with:
94-
version: '>= 363.0.0'
95-
```
79+
- uses: 'google-github-actions/setup-gcloud@v2'
80+
with:
81+
version: '>= 363.0.0'
9682

9783
You are responsible for ensuring the `gcloud` version matches the features
98-
and components required. See the [gcloud release
99-
notes][gcloud-release-notes] for a full list of versions.
84+
and components required.
10085

101-
- `project_id`: (Optional) Project ID (**not** project _number_) of the Google
102-
Cloud project. If provided, this will configure the `gcloud` CLI to use that
103-
project ID for commands. Individual commands can still override the project
104-
with the `--project` flag. If unspecified, the action attempts to find the
105-
"best" project ID by looking at other inputs and environment variables.
86+
- <a name="project_id"></a><a href="#user-content-project_id"><code>project_id</code></a>: _(Optional)_ ID of the Google Cloud project. If provided, this will configure gcloud to
87+
use this project ID by default for commands. Individual commands can still
88+
override the project using the `--project` flag which takes precedence. If
89+
unspecified, the action attempts to find the "best" project ID by looking
90+
at other inputs and environment variables.
10691

107-
- `install_components`: (Optional) List of [Cloud SDK
108-
components](https://cloud.google.com/sdk/docs/components) to install
92+
- <a name="install_components"></a><a href="#user-content-install_components"><code>install_components</code></a>: _(Optional)_ List of additional [gcloud
93+
components](https://cloud.google.com/sdk/docs/components) to install,
10994
specified as a comma-separated list of strings:
11095

111-
```yaml
112-
install_components: 'alpha,cloud-datastore-emulator'
113-
```
96+
install_components: 'alpha,cloud-datastore-emulator'
97+
98+
- <a name="skip_install"></a><a href="#user-content-skip_install"><code>skip_install</code></a>: _(Optional)_ Skip installation of gcloud and use the [system-supplied
99+
version](https://github.com/actions/runner-images) instead. If specified,
100+
the `version` input is ignored.
101+
102+
⚠️ You will not be able to install additional gcloud components, because the
103+
system installation is locked.
104+
105+
106+
<!-- END_AUTOGEN_INPUTS -->
107+
108+
## Outputs
109+
110+
<!-- BEGIN_AUTOGEN_OUTPUTS -->
111+
112+
- `version`: Version of gcloud that was installed.
113+
114+
115+
<!-- END_AUTOGEN_OUTPUTS -->
116+
114117

115118
## Authorization
116119

action.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,69 @@ description: |-
1919
Adds the `gcloud` CLI command to the $PATH.
2020
2121
inputs:
22-
skip_install:
23-
description: |-
24-
Skip installation of the gcloud SDK and use the system-supplied version
25-
instead. The "version" input will be ignored.
26-
default: false
27-
required: false
28-
2922
version:
3023
description: |-
31-
Version or version constraint of the gcloud SDK to install. If
32-
unspecified, it will accept any installed version of the gcloud SDK. If
33-
set to "latest", it will download the latest available SDK. If set to a
34-
version constraint, it will download the latest available version that
35-
matches the constraint. Examples: "290.0.1" or ">= 197.0.1".
24+
A string representing the version or version constraint of the Cloud SDK
25+
(`gcloud`) to install (e.g. `"290.0.1"` or `">= 197.0.1"`). The default
26+
value is `"latest"`, which will always download and install the latest
27+
available Cloud SDK version.
28+
29+
- uses: 'google-github-actions/setup-gcloud@v2'
30+
with:
31+
version: '>= 416.0.0'
32+
33+
If there is no installed `gcloud` version that matches the given
34+
constraint, this GitHub Action will download and install the latest
35+
available version that still matches the constraint.
36+
37+
Authenticating via Workload Identity Federation requires version
38+
[363.0.0](https://cloud.google.com/sdk/docs/release-notes#36300_2021-11-02)
39+
or newer. If you need support for Workload Identity Federation, specify
40+
your version constraint as such:
41+
42+
- uses: 'google-github-actions/setup-gcloud@v2'
43+
with:
44+
version: '>= 363.0.0'
45+
46+
You are responsible for ensuring the `gcloud` version matches the features
47+
and components required.
3648
default: 'latest'
3749
required: false
3850

3951
project_id:
4052
description: |-
4153
ID of the Google Cloud project. If provided, this will configure gcloud to
4254
use this project ID by default for commands. Individual commands can still
43-
override the project using the --project flag which takes precedence.
55+
override the project using the `--project` flag which takes precedence. If
56+
unspecified, the action attempts to find the "best" project ID by looking
57+
at other inputs and environment variables.
4458
required: false
4559

4660
install_components:
47-
description: List of Cloud SDK components to install
61+
description: |-
62+
List of additional [gcloud
63+
components](https://cloud.google.com/sdk/docs/components) to install,
64+
specified as a comma-separated list of strings:
65+
66+
install_components: 'alpha,cloud-datastore-emulator'
67+
required: false
68+
69+
skip_install:
70+
description: |-
71+
Skip installation of gcloud and use the [system-supplied
72+
version](https://github.com/actions/runner-images) instead. If specified,
73+
the `version` input is ignored.
74+
75+
⚠️ You will not be able to install additional gcloud components, because the
76+
system installation is locked.
77+
default: false
4878
required: false
4979

80+
outputs:
81+
version:
82+
description: |-
83+
Version of gcloud that was installed.
84+
5085
branding:
5186
icon: 'terminal'
5287
color: 'blue'

0 commit comments

Comments
 (0)