|
| 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