Skip to content

Commit d482963

Browse files
committed
feat(actions): add actions/download-artifact@v4
1 parent ecaf74d commit d482963

File tree

6 files changed

+129
-4
lines changed

6 files changed

+129
-4
lines changed

actions/actions/download-artifact/v4/action

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

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Click on a version to see the binding's code.
1818
* [cache](https://github.com/actions/cache) - v2: [`CacheV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CacheV2.kt), v3: [`CacheV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CacheV3.kt)
1919
* [checkout](https://github.com/actions/checkout) - v2: [`CheckoutV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CheckoutV2.kt), v3: [`CheckoutV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CheckoutV3.kt), v4: [`CheckoutV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CheckoutV4.kt)
2020
* [create-release](https://github.com/actions/create-release) - v1: [`CreateReleaseV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CreateReleaseV1.kt)
21-
* [download-artifact](https://github.com/actions/download-artifact) - v2: [`DownloadArtifactV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/DownloadArtifactV2.kt), v3: [`DownloadArtifactV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/DownloadArtifactV3.kt)
21+
* [download-artifact](https://github.com/actions/download-artifact) - v2: [`DownloadArtifactV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/DownloadArtifactV2.kt), v3: [`DownloadArtifactV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/DownloadArtifactV3.kt), v4: [`DownloadArtifactV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/DownloadArtifactV4.kt)
2222
* [first-interaction](https://github.com/actions/first-interaction) - v1: [`FirstInteractionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/FirstInteractionV1.kt)
2323
* [github-script](https://github.com/actions/github-script) - v6: [`GithubScriptV6`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/GithubScriptV6.kt), v7: [`GithubScriptV7`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/GithubScriptV7.kt)
2424
* [labeler](https://github.com/actions/labeler) - v4: [`LabelerV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/LabelerV4.kt), v5: [`LabelerV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/LabelerV5.kt)
@@ -140,6 +140,6 @@ Click on a version to see the binding's code.
140140
Number of bindings available:
141141

142142
* counting by actions: 84
143-
* counting each version separately: 141
143+
* counting each version separately: 142
144144

145145
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/actions/DownloadArtifactV2.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import kotlin.collections.toTypedArray
2929
* [Action on GitHub](https://github.com/actions/download-artifact)
3030
*/
3131
@Deprecated(
32-
message = "This action has a newer major version: DownloadArtifactV3",
33-
replaceWith = ReplaceWith("DownloadArtifactV3"),
32+
message = "This action has a newer major version: DownloadArtifactV4",
33+
replaceWith = ReplaceWith("DownloadArtifactV4"),
3434
)
3535
public data class DownloadArtifactV2 private constructor(
3636
/**

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

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

910
package io.github.typesafegithub.workflows.actions.actions
1011

1112
import io.github.typesafegithub.workflows.domain.actions.Action
1213
import io.github.typesafegithub.workflows.domain.actions.RegularAction
1314
import java.util.LinkedHashMap
15+
import kotlin.Deprecated
1416
import kotlin.String
1517
import kotlin.Suppress
1618
import kotlin.Unit
@@ -26,6 +28,10 @@ import kotlin.collections.toTypedArray
2628
*
2729
* [Action on GitHub](https://github.com/actions/download-artifact)
2830
*/
31+
@Deprecated(
32+
message = "This action has a newer major version: DownloadArtifactV4",
33+
replaceWith = ReplaceWith("DownloadArtifactV4"),
34+
)
2935
public data class DownloadArtifactV3 private constructor(
3036
/**
3137
* Artifact name
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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.actions
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.Map
19+
import kotlin.collections.toList
20+
import kotlin.collections.toTypedArray
21+
22+
/**
23+
* Action: Download a Build Artifact
24+
*
25+
* Download a build artifact that was previously uploaded in the workflow by the upload-artifact
26+
* action
27+
*
28+
* [Action on GitHub](https://github.com/actions/download-artifact)
29+
*/
30+
public data class DownloadArtifactV4 private constructor(
31+
/**
32+
* Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.
33+
*/
34+
public val name: String? = null,
35+
/**
36+
* Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE
37+
*/
38+
public val path: String? = null,
39+
/**
40+
* A glob pattern matching the artifacts that should be downloaded. Ignored if name is
41+
* specified.
42+
*/
43+
public val pattern: String? = null,
44+
/**
45+
* When multiple artifacts are matched, this changes the behavior of the destination
46+
* directories. If true, the downloaded artifacts will be in the same directory specified by path.
47+
* If false, the downloaded artifacts will be extracted into individual named directories within
48+
* the specified path.
49+
*/
50+
public val mergeMultiple: Boolean? = null,
51+
/**
52+
* The GitHub token used to authenticate with the GitHub API. This is required when downloading
53+
* artifacts from a different repository or from a different workflow run. If this is not
54+
* specified, the action will attempt to download artifacts from the current repository and the
55+
* current workflow run.
56+
*/
57+
public val githubToken: String? = null,
58+
/**
59+
* The repository owner and the repository name joined together by "/". If github-token is
60+
* specified, this is the repository that artifacts will be downloaded from.
61+
*/
62+
public val repository: String? = null,
63+
/**
64+
* The id of the workflow run where the desired download artifact was uploaded from. If
65+
* github-token is specified, this is the run that artifacts will be downloaded from.
66+
*/
67+
public val runId: String? = null,
68+
/**
69+
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
70+
*/
71+
public val _customInputs: Map<String, String> = mapOf(),
72+
/**
73+
* Allows overriding action's version, for example to use a specific minor version, or a newer
74+
* version that the binding doesn't yet know about
75+
*/
76+
public val _customVersion: String? = null,
77+
) : RegularAction<DownloadArtifactV4.Outputs>("actions", "download-artifact", _customVersion ?:
78+
"v4") {
79+
public constructor(
80+
vararg pleaseUseNamedArguments: Unit,
81+
name: String? = null,
82+
path: String? = null,
83+
pattern: String? = null,
84+
mergeMultiple: Boolean? = null,
85+
githubToken: String? = null,
86+
repository: String? = null,
87+
runId: String? = null,
88+
_customInputs: Map<String, String> = mapOf(),
89+
_customVersion: String? = null,
90+
) : this(name=name, path=path, pattern=pattern, mergeMultiple=mergeMultiple,
91+
githubToken=githubToken, repository=repository, runId=runId,
92+
_customInputs=_customInputs, _customVersion=_customVersion)
93+
94+
@Suppress("SpreadOperator")
95+
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
96+
*listOfNotNull(
97+
name?.let { "name" to it },
98+
path?.let { "path" to it },
99+
pattern?.let { "pattern" to it },
100+
mergeMultiple?.let { "merge-multiple" to it.toString() },
101+
githubToken?.let { "github-token" to it },
102+
repository?.let { "repository" to it },
103+
runId?.let { "run-id" to it },
104+
*_customInputs.toList().toTypedArray(),
105+
).toTypedArray()
106+
)
107+
108+
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)
109+
110+
public class Outputs(
111+
stepId: String,
112+
) : Action.Outputs(stepId) {
113+
/**
114+
* Path of artifact download
115+
*/
116+
public val downloadPath: String = "steps.$stepId.outputs.download-path"
117+
}
118+
}

0 commit comments

Comments
 (0)