Skip to content

Commit 6f10731

Browse files
committed
feat(actions): add google-github-actions/setup-gcloud@v2
1 parent 9ebc027 commit 6f10731

File tree

6 files changed

+173
-4
lines changed

6 files changed

+173
-4
lines changed

actions/google-github-actions/setup-gcloud/v2/action

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
825196879a077b7efa50db2e88409f44de4635c2

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Click on a version to see the binding's code.
8282
* [codeql-action/upload-sarif](https://github.com/github/codeql-action/tree/v2/upload-sarif) - v2: [`CodeqlActionUploadSarifV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/github/CodeqlActionUploadSarifV2.kt)
8383
* google-github-actions
8484
* [auth](https://github.com/google-github-actions/auth) - v0: [`AuthV0`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/AuthV0.kt), v1: [`AuthV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/AuthV1.kt), v2: [`AuthV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/AuthV2.kt)
85-
* [setup-gcloud](https://github.com/google-github-actions/setup-gcloud) - v0: [`SetupGcloudV0`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV0.kt), v1: [`SetupGcloudV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV1.kt)
85+
* [setup-gcloud](https://github.com/google-github-actions/setup-gcloud) - v0: [`SetupGcloudV0`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV0.kt), v1: [`SetupGcloudV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV1.kt), v2: [`SetupGcloudV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV2.kt)
8686
* GoogleCloudPlatform
8787
* [github-actions](https://github.com/GoogleCloudPlatform/github-actions) - v0: [`GithubActionsV0`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlecloudplatform/GithubActionsV0.kt), v1: [`GithubActionsV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlecloudplatform/GithubActionsV1.kt)
8888
* gradle-update
@@ -142,6 +142,6 @@ Click on a version to see the binding's code.
142142
Number of bindings available:
143143

144144
* counting by actions: 85
145-
* counting each version separately: 142
145+
* counting each version separately: 143
146146

147147
Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 18

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV0.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import kotlin.collections.toTypedArray
3131
* [Action on GitHub](https://github.com/google-github-actions/setup-gcloud)
3232
*/
3333
@Deprecated(
34-
message = "This action has a newer major version: SetupGcloudV1",
35-
replaceWith = ReplaceWith("SetupGcloudV1"),
34+
message = "This action has a newer major version: SetupGcloudV2",
35+
replaceWith = ReplaceWith("SetupGcloudV2"),
3636
)
3737
public data class SetupGcloudV0 private constructor(
3838
/**

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/googlegithubactions/SetupGcloudV1.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@file:Suppress(
55
"DataClassPrivateConstructor",
66
"UNUSED_PARAMETER",
7+
"DEPRECATION",
78
)
89

910
package io.github.typesafegithub.workflows.actions.googlegithubactions
@@ -12,6 +13,7 @@ import io.github.typesafegithub.workflows.domain.actions.Action
1213
import io.github.typesafegithub.workflows.domain.actions.RegularAction
1314
import java.util.LinkedHashMap
1415
import kotlin.Boolean
16+
import kotlin.Deprecated
1517
import kotlin.String
1618
import kotlin.Suppress
1719
import kotlin.Unit
@@ -28,6 +30,10 @@ import kotlin.collections.toTypedArray
2830
*
2931
* [Action on GitHub](https://github.com/google-github-actions/setup-gcloud)
3032
*/
33+
@Deprecated(
34+
message = "This action has a newer major version: SetupGcloudV2",
35+
replaceWith = ReplaceWith("SetupGcloudV2"),
36+
)
3137
public data class SetupGcloudV1 private constructor(
3238
/**
3339
* Skip installation of the gcloud SDK and use the system-supplied version
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
2+
// changes will be overwritten with the next binding code regeneration.
3+
// See https://github.com/typesafegithub/github-workflows-kt for more info.
4+
@file:Suppress(
5+
"DataClassPrivateConstructor",
6+
"UNUSED_PARAMETER",
7+
)
8+
9+
package io.github.typesafegithub.workflows.actions.googlegithubactions
10+
11+
import io.github.typesafegithub.workflows.domain.actions.Action
12+
import io.github.typesafegithub.workflows.domain.actions.RegularAction
13+
import java.util.LinkedHashMap
14+
import kotlin.Boolean
15+
import kotlin.String
16+
import kotlin.Suppress
17+
import kotlin.Unit
18+
import kotlin.collections.List
19+
import kotlin.collections.Map
20+
import kotlin.collections.toList
21+
import kotlin.collections.toTypedArray
22+
23+
/**
24+
* Action: Set up gcloud Cloud SDK environment
25+
*
26+
* Downloads, installs, and configures a Google Cloud SDK environment.
27+
* Adds the `gcloud` CLI command to the $PATH.
28+
*
29+
* [Action on GitHub](https://github.com/google-github-actions/setup-gcloud)
30+
*/
31+
public data class SetupGcloudV2 private constructor(
32+
/**
33+
* Skip installation of the gcloud SDK and use the system-supplied version
34+
* instead. The "version" input will be ignored.
35+
*/
36+
public val skipInstall: Boolean? = null,
37+
/**
38+
* Version or version constraint of the gcloud SDK to install. If
39+
* unspecified, it will accept any installed version of the gcloud SDK. If
40+
* set to "latest", it will download the latest available SDK. If set to a
41+
* version constraint, it will download the latest available version that
42+
* matches the constraint. Examples: "290.0.1" or ">= 197.0.1".
43+
*/
44+
public val version: String? = null,
45+
/**
46+
* ID of the Google Cloud project. If provided, this will configure gcloud to
47+
* use this project ID by default for commands. Individual commands can still
48+
* override the project using the --project flag which takes precedence.
49+
*/
50+
public val projectId: String? = null,
51+
/**
52+
* List of Cloud SDK components to install
53+
*/
54+
public val installComponents: List<SetupGcloudV2.Component>? = null,
55+
/**
56+
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
57+
*/
58+
public val _customInputs: Map<String, String> = mapOf(),
59+
/**
60+
* Allows overriding action's version, for example to use a specific minor version, or a newer
61+
* version that the binding doesn't yet know about
62+
*/
63+
public val _customVersion: String? = null,
64+
) : RegularAction<Action.Outputs>("google-github-actions", "setup-gcloud", _customVersion ?: "v2") {
65+
public constructor(
66+
vararg pleaseUseNamedArguments: Unit,
67+
skipInstall: Boolean? = null,
68+
version: String? = null,
69+
projectId: String? = null,
70+
installComponents: List<SetupGcloudV2.Component>? = null,
71+
_customInputs: Map<String, String> = mapOf(),
72+
_customVersion: String? = null,
73+
) : this(skipInstall=skipInstall, version=version, projectId=projectId,
74+
installComponents=installComponents, _customInputs=_customInputs,
75+
_customVersion=_customVersion)
76+
77+
@Suppress("SpreadOperator")
78+
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
79+
*listOfNotNull(
80+
skipInstall?.let { "skip_install" to it.toString() },
81+
version?.let { "version" to it },
82+
projectId?.let { "project_id" to it },
83+
installComponents?.let { "install_components" to it.joinToString(",") { it.stringValue }
84+
},
85+
*_customInputs.toList().toTypedArray(),
86+
).toTypedArray()
87+
)
88+
89+
override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
90+
91+
public sealed class Component(
92+
public val stringValue: String,
93+
) {
94+
public object Alpha : SetupGcloudV2.Component("alpha")
95+
96+
public object AnthosAuth : SetupGcloudV2.Component("anthos-auth")
97+
98+
public object Appctl : SetupGcloudV2.Component("appctl")
99+
100+
public object AppEngineGo : SetupGcloudV2.Component("app-engine-go")
101+
102+
public object AppEngineJava : SetupGcloudV2.Component("app-engine-java")
103+
104+
public object AppEnginePython : SetupGcloudV2.Component("app-engine-python")
105+
106+
public object AppEnginePythonExtras : SetupGcloudV2.Component("app-engine-python-extras")
107+
108+
public object Beta : SetupGcloudV2.Component("beta")
109+
110+
public object Bigtable : SetupGcloudV2.Component("bigtable")
111+
112+
public object Bq : SetupGcloudV2.Component("bq")
113+
114+
public object BundledPython3Unix : SetupGcloudV2.Component("bundled-python3-unix")
115+
116+
public object Cbt : SetupGcloudV2.Component("cbt")
117+
118+
public object CloudBuildLocal : SetupGcloudV2.Component("cloud-build-local")
119+
120+
public object CloudDatastoreEmulator : SetupGcloudV2.Component("cloud-datastore-emulator")
121+
122+
public object CloudFirestoreEmulator : SetupGcloudV2.Component("cloud-firestore-emulator")
123+
124+
public object CloudSpannerEmulator : SetupGcloudV2.Component("cloud-spanner-emulator")
125+
126+
public object CloudSqlProxy : SetupGcloudV2.Component("cloud_sql_proxy")
127+
128+
public object ConfigConnector : SetupGcloudV2.Component("config-connector")
129+
130+
public object Core : SetupGcloudV2.Component("core")
131+
132+
public object Datalab : SetupGcloudV2.Component("datalab")
133+
134+
public object DockerCredentialGcr : SetupGcloudV2.Component("docker-credential-gcr")
135+
136+
public object Gsutil : SetupGcloudV2.Component("gsutil")
137+
138+
public object Kpt : SetupGcloudV2.Component("kpt")
139+
140+
public object Kubectl : SetupGcloudV2.Component("kubectl")
141+
142+
public object KubectlOidc : SetupGcloudV2.Component("kubectl-oidc")
143+
144+
public object Kustomize : SetupGcloudV2.Component("kustomize")
145+
146+
public object LocalExtract : SetupGcloudV2.Component("local-extract")
147+
148+
public object Minikube : SetupGcloudV2.Component("minikube")
149+
150+
public object Nomos : SetupGcloudV2.Component("nomos")
151+
152+
public object Pkg : SetupGcloudV2.Component("pkg")
153+
154+
public object PubsubEmulator : SetupGcloudV2.Component("pubsub-emulator")
155+
156+
public object Skaffold : SetupGcloudV2.Component("skaffold")
157+
158+
public class Custom(
159+
customStringValue: String,
160+
) : SetupGcloudV2.Component(customStringValue)
161+
}
162+
}

0 commit comments

Comments
 (0)