Skip to content

Commit 6ee88b9

Browse files
authored
feat(actions): add gradle/wrapper-validation-action@v3 (#1426)
Closes #1421.
1 parent 5f47803 commit 6ee88b9

File tree

6 files changed

+113
-4
lines changed

6 files changed

+113
-4
lines changed

actions/gradle/wrapper-validation-action/v3/action

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

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Click on a version to see the binding's code.
8888
* gradle
8989
* [actions/setup-gradle](https://github.com/gradle/actions/tree/v3/setup-gradle) - v3: [`ActionsSetupGradleV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/ActionsSetupGradleV3.kt)
9090
* [gradle-build-action](https://github.com/gradle/gradle-build-action) - v2: [`GradleBuildActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/GradleBuildActionV2.kt), v3: [`GradleBuildActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/GradleBuildActionV3.kt)
91-
* [wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) - v1: [`WrapperValidationActionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/WrapperValidationActionV1.kt), v2: [`WrapperValidationActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/WrapperValidationActionV2.kt)
91+
* [wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) - v1: [`WrapperValidationActionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/WrapperValidationActionV1.kt), v2: [`WrapperValidationActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/WrapperValidationActionV2.kt), v3: [`WrapperValidationActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/WrapperValidationActionV3.kt)
9292
* JamesIves
9393
* [github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) - v4: [`GithubPagesDeployActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/jamesives/GithubPagesDeployActionV4.kt)
9494
* JasonEtco
@@ -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: 164
144+
* counting each version separately: 165
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/gradle/WrapperValidationActionV1.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import kotlin.collections.toTypedArray
4343
* version, or a newer version that the binding doesn't yet know about
4444
*/
4545
@Deprecated(
46-
message = "This action has a newer major version: WrapperValidationActionV2",
47-
replaceWith = ReplaceWith("WrapperValidationActionV2"),
46+
message = "This action has a newer major version: WrapperValidationActionV3",
47+
replaceWith = ReplaceWith("WrapperValidationActionV3"),
4848
)
4949
public data class WrapperValidationActionV1 private constructor(
5050
/**

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradle/WrapperValidationActionV2.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.gradle
@@ -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.Int
1618
import kotlin.String
1719
import kotlin.Suppress
@@ -40,6 +42,10 @@ import kotlin.collections.toTypedArray
4042
* @param _customVersion Allows overriding action's version, for example to use a specific minor
4143
* version, or a newer version that the binding doesn't yet know about
4244
*/
45+
@Deprecated(
46+
message = "This action has a newer major version: WrapperValidationActionV3",
47+
replaceWith = ReplaceWith("WrapperValidationActionV3"),
48+
)
4349
public data class WrapperValidationActionV2 private constructor(
4450
/**
4551
* Minimum number expected gradle-wrapper.jar files found in the repository. Non-negative
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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.gradle
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.Int
16+
import kotlin.String
17+
import kotlin.Suppress
18+
import kotlin.Unit
19+
import kotlin.collections.List
20+
import kotlin.collections.Map
21+
import kotlin.collections.toList
22+
import kotlin.collections.toTypedArray
23+
24+
/**
25+
* Action: Gradle Wrapper Validation
26+
*
27+
* Validates Gradle Wrapper JAR Files
28+
*
29+
* [Action on GitHub](https://github.com/gradle/wrapper-validation-action)
30+
*
31+
* @param minWrapperCount Minimum number expected gradle-wrapper.jar files found in the repository.
32+
* Non-negative number. Higher number is useful in monorepos where each project might have their own
33+
* wrapper.
34+
* @param allowSnapshots Allow Gradle snapshot versions during checksum verification. Boolean, true
35+
* or false.
36+
* @param allowChecksums Accept arbitrary user-defined checksums as valid. Comma separated list of
37+
* SHA256 checksums (lowercase hex).
38+
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
39+
* the binding
40+
* @param _customVersion Allows overriding action's version, for example to use a specific minor
41+
* version, or a newer version that the binding doesn't yet know about
42+
*/
43+
public data class WrapperValidationActionV3 private constructor(
44+
/**
45+
* Minimum number expected gradle-wrapper.jar files found in the repository. Non-negative
46+
* number. Higher number is useful in monorepos where each project might have their own wrapper.
47+
*/
48+
public val minWrapperCount: Int? = null,
49+
/**
50+
* Allow Gradle snapshot versions during checksum verification. Boolean, true or false.
51+
*/
52+
public val allowSnapshots: Boolean? = null,
53+
/**
54+
* Accept arbitrary user-defined checksums as valid. Comma separated list of SHA256 checksums
55+
* (lowercase hex).
56+
*/
57+
public val allowChecksums: List<String>? = null,
58+
/**
59+
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
60+
*/
61+
public val _customInputs: Map<String, String> = mapOf(),
62+
/**
63+
* Allows overriding action's version, for example to use a specific minor version, or a newer
64+
* version that the binding doesn't yet know about
65+
*/
66+
public val _customVersion: String? = null,
67+
) : RegularAction<WrapperValidationActionV3.Outputs>("gradle", "wrapper-validation-action",
68+
_customVersion ?: "v3") {
69+
public constructor(
70+
vararg pleaseUseNamedArguments: Unit,
71+
minWrapperCount: Int? = null,
72+
allowSnapshots: Boolean? = null,
73+
allowChecksums: List<String>? = null,
74+
_customInputs: Map<String, String> = mapOf(),
75+
_customVersion: String? = null,
76+
) : this(minWrapperCount=minWrapperCount, allowSnapshots=allowSnapshots,
77+
allowChecksums=allowChecksums, _customInputs=_customInputs,
78+
_customVersion=_customVersion)
79+
80+
@Suppress("SpreadOperator")
81+
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
82+
*listOfNotNull(
83+
minWrapperCount?.let { "min-wrapper-count" to it.toString() },
84+
allowSnapshots?.let { "allow-snapshots" to it.toString() },
85+
allowChecksums?.let { "allow-checksums" to it.joinToString(",") },
86+
*_customInputs.toList().toTypedArray(),
87+
).toTypedArray()
88+
)
89+
90+
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)
91+
92+
public class Outputs(
93+
stepId: String,
94+
) : Action.Outputs(stepId) {
95+
/**
96+
* The path of the Gradle Wrapper(s) JAR that failed validation. Path is a
97+
* platform-dependent relative path to git repository root. Multiple paths are separated by a |
98+
* character.
99+
*/
100+
public val failedWrapper: String = "steps.$stepId.outputs.failed-wrapper"
101+
}
102+
}

0 commit comments

Comments
 (0)