Skip to content

Commit 656fb5f

Browse files
authored
feat(actions): add docker/build-push-action@v6 (#1520)
Closes #1518.
1 parent 2d82d0a commit 656fb5f

File tree

8 files changed

+333
-8
lines changed

8 files changed

+333
-8
lines changed

actions/docker/build-push-action/v6/action

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

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Click on a version to see the binding's code.
6060
* cycjimmy
6161
* [semantic-release-action](https://github.com/cycjimmy/semantic-release-action) - v3: [`SemanticReleaseActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cycjimmy/SemanticReleaseActionV3.kt), v4: [`SemanticReleaseActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cycjimmy/SemanticReleaseActionV4.kt)
6262
* docker
63-
* [build-push-action](https://github.com/docker/build-push-action) - v2: [`BuildPushActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV2.kt), v3: [`BuildPushActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV3.kt), v4: [`BuildPushActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV4.kt), v5: [`BuildPushActionV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV5.kt)
63+
* [build-push-action](https://github.com/docker/build-push-action) - v2: [`BuildPushActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV2.kt), v3: [`BuildPushActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV3.kt), v4: [`BuildPushActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV4.kt), v5: [`BuildPushActionV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV5.kt), v6: [`BuildPushActionV6`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV6.kt)
6464
* [login-action](https://github.com/docker/login-action) - v1: [`LoginActionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/LoginActionV1.kt), v2: [`LoginActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/LoginActionV2.kt), v3: [`LoginActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/LoginActionV3.kt)
6565
* [metadata-action](https://github.com/docker/metadata-action) - v4: [`MetadataActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/MetadataActionV4.kt), v5: [`MetadataActionV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/MetadataActionV5.kt)
6666
* [setup-buildx-action](https://github.com/docker/setup-buildx-action) - v1: [`SetupBuildxActionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/SetupBuildxActionV1.kt), v2: [`SetupBuildxActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/SetupBuildxActionV2.kt), v3: [`SetupBuildxActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/SetupBuildxActionV3.kt)
@@ -141,6 +141,6 @@ Click on a version to see the binding's code.
141141
Number of bindings available:
142142

143143
* counting by actions: 85
144-
* counting each version separately: 167
144+
* counting each version separately: 168
145145

146146
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/docker/BuildPushActionV2.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ import kotlin.collections.toTypedArray
6464
* version, or a newer version that the binding doesn't yet know about
6565
*/
6666
@Deprecated(
67-
message = "This action has a newer major version: BuildPushActionV5",
68-
replaceWith = ReplaceWith("BuildPushActionV5"),
67+
message = "This action has a newer major version: BuildPushActionV6",
68+
replaceWith = ReplaceWith("BuildPushActionV6"),
6969
)
7070
public data class BuildPushActionV2 private constructor(
7171
/**

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV3.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ import kotlin.collections.toTypedArray
6969
* version, or a newer version that the binding doesn't yet know about
7070
*/
7171
@Deprecated(
72-
message = "This action has a newer major version: BuildPushActionV5",
73-
replaceWith = ReplaceWith("BuildPushActionV5"),
72+
message = "This action has a newer major version: BuildPushActionV6",
73+
replaceWith = ReplaceWith("BuildPushActionV6"),
7474
)
7575
public data class BuildPushActionV3 private constructor(
7676
/**

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV4.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ import kotlin.collections.toTypedArray
6969
* version, or a newer version that the binding doesn't yet know about
7070
*/
7171
@Deprecated(
72-
message = "This action has a newer major version: BuildPushActionV5",
73-
replaceWith = ReplaceWith("BuildPushActionV5"),
72+
message = "This action has a newer major version: BuildPushActionV6",
73+
replaceWith = ReplaceWith("BuildPushActionV6"),
7474
)
7575
public data class BuildPushActionV4 private constructor(
7676
/**

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/docker/BuildPushActionV5.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.docker
@@ -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
@@ -69,6 +71,10 @@ import kotlin.collections.toTypedArray
6971
* @param _customVersion Allows overriding action's version, for example to use a specific minor
7072
* version, or a newer version that the binding doesn't yet know about
7173
*/
74+
@Deprecated(
75+
message = "This action has a newer major version: BuildPushActionV6",
76+
replaceWith = ReplaceWith("BuildPushActionV6"),
77+
)
7278
public data class BuildPushActionV5 private constructor(
7379
/**
7480
* List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)
Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
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.docker
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: Build and push Docker images
25+
*
26+
* Build and push Docker images with Buildx
27+
*
28+
* [Action on GitHub](https://github.com/docker/build-push-action)
29+
*
30+
* @param addHosts List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)
31+
* @param allow List of extra privileged entitlement (e.g., network.host,security.insecure)
32+
* @param annotations List of annotation to set to the image
33+
* @param attests List of attestation parameters (e.g., type=sbom,generator=image)
34+
* @param buildArgs List of build-time variables
35+
* @param buildContexts List of additional build contexts (e.g., name=path)
36+
* @param builder Builder instance
37+
* @param cacheFrom List of external cache sources for buildx (e.g., user/app:cache,
38+
* type=local,src=path/to/dir)
39+
* @param cacheTo List of cache export destinations for buildx (e.g., user/app:cache,
40+
* type=local,dest=path/to/dir)
41+
* @param cgroupParent Optional parent cgroup for the container used in the build
42+
* @param context Build's context is the set of files located in the specified PATH or URL
43+
* @param file Path to the Dockerfile
44+
* @param labels List of metadata for an image
45+
* @param load Load is a shorthand for --output=type=docker
46+
* @param network Set the networking mode for the RUN instructions during build
47+
* @param noCache Do not use cache when building the image
48+
* @param noCacheFilters Do not cache specified stages
49+
* @param outputs List of output destinations (format: type=local,dest=path)
50+
* @param platforms List of target platforms for build
51+
* @param provenance Generate provenance attestation for the build (shorthand
52+
* for --attest=type=provenance)
53+
* @param pull Always attempt to pull all referenced images
54+
* @param push Push is a shorthand for --output=type=registry
55+
* @param sbom Generate SBOM attestation for the build (shorthand for --attest=type=sbom)
56+
* @param secrets List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)
57+
* @param secretEnvs List of secret env vars to expose to the build (e.g., key=envname,
58+
* MY_SECRET=MY_ENV_VAR)
59+
* @param secretFiles List of secret files to expose to the build (e.g., key=filename,
60+
* MY_SECRET=./secret.txt)
61+
* @param shmSize Size of /dev/shm (e.g., 2g)
62+
* @param ssh List of SSH agent socket or keys to expose to the build
63+
* @param tags List of tags
64+
* @param target Sets the target stage to build
65+
* @param ulimit Ulimit options (e.g., nofile=1024:1024)
66+
* @param githubToken GitHub Token used to authenticate against a repository for Git context
67+
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
68+
* the binding
69+
* @param _customVersion Allows overriding action's version, for example to use a specific minor
70+
* version, or a newer version that the binding doesn't yet know about
71+
*/
72+
public data class BuildPushActionV6 private constructor(
73+
/**
74+
* List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)
75+
*/
76+
public val addHosts: List<String>? = null,
77+
/**
78+
* List of extra privileged entitlement (e.g., network.host,security.insecure)
79+
*/
80+
public val allow: List<String>? = null,
81+
/**
82+
* List of annotation to set to the image
83+
*/
84+
public val annotations: List<String>? = null,
85+
/**
86+
* List of attestation parameters (e.g., type=sbom,generator=image)
87+
*/
88+
public val attests: List<String>? = null,
89+
/**
90+
* List of build-time variables
91+
*/
92+
public val buildArgs: List<String>? = null,
93+
/**
94+
* List of additional build contexts (e.g., name=path)
95+
*/
96+
public val buildContexts: List<String>? = null,
97+
/**
98+
* Builder instance
99+
*/
100+
public val builder: String? = null,
101+
/**
102+
* List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)
103+
*/
104+
public val cacheFrom: List<String>? = null,
105+
/**
106+
* List of cache export destinations for buildx (e.g., user/app:cache,
107+
* type=local,dest=path/to/dir)
108+
*/
109+
public val cacheTo: List<String>? = null,
110+
/**
111+
* Optional parent cgroup for the container used in the build
112+
*/
113+
public val cgroupParent: String? = null,
114+
/**
115+
* Build's context is the set of files located in the specified PATH or URL
116+
*/
117+
public val context: String? = null,
118+
/**
119+
* Path to the Dockerfile
120+
*/
121+
public val `file`: String? = null,
122+
/**
123+
* List of metadata for an image
124+
*/
125+
public val labels: List<String>? = null,
126+
/**
127+
* Load is a shorthand for --output=type=docker
128+
*/
129+
public val load: Boolean? = null,
130+
/**
131+
* Set the networking mode for the RUN instructions during build
132+
*/
133+
public val network: String? = null,
134+
/**
135+
* Do not use cache when building the image
136+
*/
137+
public val noCache: Boolean? = null,
138+
/**
139+
* Do not cache specified stages
140+
*/
141+
public val noCacheFilters: List<String>? = null,
142+
/**
143+
* List of output destinations (format: type=local,dest=path)
144+
*/
145+
public val outputs: List<String>? = null,
146+
/**
147+
* List of target platforms for build
148+
*/
149+
public val platforms: List<String>? = null,
150+
/**
151+
* Generate provenance attestation for the build (shorthand for --attest=type=provenance)
152+
*/
153+
public val provenance: Boolean? = null,
154+
/**
155+
* Always attempt to pull all referenced images
156+
*/
157+
public val pull: Boolean? = null,
158+
/**
159+
* Push is a shorthand for --output=type=registry
160+
*/
161+
public val push: Boolean? = null,
162+
/**
163+
* Generate SBOM attestation for the build (shorthand for --attest=type=sbom)
164+
*/
165+
public val sbom: Boolean? = null,
166+
/**
167+
* List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)
168+
*/
169+
public val secrets: List<String>? = null,
170+
/**
171+
* List of secret env vars to expose to the build (e.g., key=envname, MY_SECRET=MY_ENV_VAR)
172+
*/
173+
public val secretEnvs: List<String>? = null,
174+
/**
175+
* List of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)
176+
*/
177+
public val secretFiles: List<String>? = null,
178+
/**
179+
* Size of /dev/shm (e.g., 2g)
180+
*/
181+
public val shmSize: String? = null,
182+
/**
183+
* List of SSH agent socket or keys to expose to the build
184+
*/
185+
public val ssh: List<String>? = null,
186+
/**
187+
* List of tags
188+
*/
189+
public val tags: List<String>? = null,
190+
/**
191+
* Sets the target stage to build
192+
*/
193+
public val target: String? = null,
194+
/**
195+
* Ulimit options (e.g., nofile=1024:1024)
196+
*/
197+
public val ulimit: String? = null,
198+
/**
199+
* GitHub Token used to authenticate against a repository for Git context
200+
*/
201+
public val githubToken: String? = null,
202+
/**
203+
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
204+
*/
205+
public val _customInputs: Map<String, String> = mapOf(),
206+
/**
207+
* Allows overriding action's version, for example to use a specific minor version, or a newer
208+
* version that the binding doesn't yet know about
209+
*/
210+
public val _customVersion: String? = null,
211+
) : RegularAction<BuildPushActionV6.Outputs>("docker", "build-push-action", _customVersion ?: "v6")
212+
{
213+
public constructor(
214+
vararg pleaseUseNamedArguments: Unit,
215+
addHosts: List<String>? = null,
216+
allow: List<String>? = null,
217+
annotations: List<String>? = null,
218+
attests: List<String>? = null,
219+
buildArgs: List<String>? = null,
220+
buildContexts: List<String>? = null,
221+
builder: String? = null,
222+
cacheFrom: List<String>? = null,
223+
cacheTo: List<String>? = null,
224+
cgroupParent: String? = null,
225+
context: String? = null,
226+
`file`: String? = null,
227+
labels: List<String>? = null,
228+
load: Boolean? = null,
229+
network: String? = null,
230+
noCache: Boolean? = null,
231+
noCacheFilters: List<String>? = null,
232+
outputs: List<String>? = null,
233+
platforms: List<String>? = null,
234+
provenance: Boolean? = null,
235+
pull: Boolean? = null,
236+
push: Boolean? = null,
237+
sbom: Boolean? = null,
238+
secrets: List<String>? = null,
239+
secretEnvs: List<String>? = null,
240+
secretFiles: List<String>? = null,
241+
shmSize: String? = null,
242+
ssh: List<String>? = null,
243+
tags: List<String>? = null,
244+
target: String? = null,
245+
ulimit: String? = null,
246+
githubToken: String? = null,
247+
_customInputs: Map<String, String> = mapOf(),
248+
_customVersion: String? = null,
249+
) : this(addHosts=addHosts, allow=allow, annotations=annotations, attests=attests,
250+
buildArgs=buildArgs, buildContexts=buildContexts, builder=builder, cacheFrom=cacheFrom,
251+
cacheTo=cacheTo, cgroupParent=cgroupParent, context=context, `file`=`file`,
252+
labels=labels, load=load, network=network, noCache=noCache,
253+
noCacheFilters=noCacheFilters, outputs=outputs, platforms=platforms,
254+
provenance=provenance, pull=pull, push=push, sbom=sbom, secrets=secrets,
255+
secretEnvs=secretEnvs, secretFiles=secretFiles, shmSize=shmSize, ssh=ssh, tags=tags,
256+
target=target, ulimit=ulimit, githubToken=githubToken, _customInputs=_customInputs,
257+
_customVersion=_customVersion)
258+
259+
@Suppress("SpreadOperator")
260+
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
261+
*listOfNotNull(
262+
addHosts?.let { "add-hosts" to it.joinToString("\n") },
263+
allow?.let { "allow" to it.joinToString("\n") },
264+
annotations?.let { "annotations" to it.joinToString("\n") },
265+
attests?.let { "attests" to it.joinToString(",") },
266+
buildArgs?.let { "build-args" to it.joinToString("\n") },
267+
buildContexts?.let { "build-contexts" to it.joinToString("\n") },
268+
builder?.let { "builder" to it },
269+
cacheFrom?.let { "cache-from" to it.joinToString("\n") },
270+
cacheTo?.let { "cache-to" to it.joinToString("\n") },
271+
cgroupParent?.let { "cgroup-parent" to it },
272+
context?.let { "context" to it },
273+
`file`?.let { "file" to it },
274+
labels?.let { "labels" to it.joinToString(",") },
275+
load?.let { "load" to it.toString() },
276+
network?.let { "network" to it },
277+
noCache?.let { "no-cache" to it.toString() },
278+
noCacheFilters?.let { "no-cache-filters" to it.joinToString(",") },
279+
outputs?.let { "outputs" to it.joinToString(",") },
280+
platforms?.let { "platforms" to it.joinToString(",") },
281+
provenance?.let { "provenance" to it.toString() },
282+
pull?.let { "pull" to it.toString() },
283+
push?.let { "push" to it.toString() },
284+
sbom?.let { "sbom" to it.toString() },
285+
secrets?.let { "secrets" to it.joinToString("\n") },
286+
secretEnvs?.let { "secret-envs" to it.joinToString("\n") },
287+
secretFiles?.let { "secret-files" to it.joinToString("\n") },
288+
shmSize?.let { "shm-size" to it },
289+
ssh?.let { "ssh" to it.joinToString("\n") },
290+
tags?.let { "tags" to it.joinToString("\n") },
291+
target?.let { "target" to it },
292+
ulimit?.let { "ulimit" to it },
293+
githubToken?.let { "github-token" to it },
294+
*_customInputs.toList().toTypedArray(),
295+
).toTypedArray()
296+
)
297+
298+
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)
299+
300+
public class Outputs(
301+
stepId: String,
302+
) : Action.Outputs(stepId) {
303+
/**
304+
* Image ID
305+
*/
306+
public val imageid: String = "steps.$stepId.outputs.imageid"
307+
308+
/**
309+
* Image digest
310+
*/
311+
public val digest: String = "steps.$stepId.outputs.digest"
312+
313+
/**
314+
* Build result metadata
315+
*/
316+
public val metadata: String = "steps.$stepId.outputs.metadata"
317+
}
318+
}

0 commit comments

Comments
 (0)