Skip to content

Commit

Permalink
feat(actions): add gradle/wrapper-validation-action@v2
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 committed Feb 5, 2024
1 parent f670c22 commit 30f859e
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 2 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
27152f6fa06a6b8062ef7195c795692e51fc2c81
4 changes: 2 additions & 2 deletions docs/supported-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Click on a version to see the binding's code.
* [update-gradle-wrapper-action](https://github.com/gradle-update/update-gradle-wrapper-action) - v1: [`UpdateGradleWrapperActionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/gradleupdate/UpdateGradleWrapperActionV1.kt)
* gradle
* [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)
* [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)
* [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)
* JamesIves
* [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)
* JasonEtco
Expand Down Expand Up @@ -140,6 +140,6 @@ Click on a version to see the binding's code.
Number of bindings available:

* counting by actions: 84
* counting each version separately: 151
* counting each version separately: 152

Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 18
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
"DEPRECATION",
)

package io.github.typesafegithub.workflows.actions.gradle
Expand All @@ -12,6 +13,7 @@ import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
Expand Down Expand Up @@ -40,6 +42,10 @@ import kotlin.collections.toTypedArray
* @param _customVersion Allows overriding action's version, for example to use a specific minor
* version, or a newer version that the binding doesn't yet know about
*/
@Deprecated(
message = "This action has a newer major version: WrapperValidationActionV2",
replaceWith = ReplaceWith("WrapperValidationActionV2"),
)
public data class WrapperValidationActionV1 private constructor(
/**
* Minimum number expected gradle-wrapper.jar files found in the repository. Non-negative
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
// changes will be overwritten with the next binding code regeneration.
// See https://github.com/typesafegithub/github-workflows-kt for more info.
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
)

package io.github.typesafegithub.workflows.actions.gradle

import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray

/**
* Action: Gradle Wrapper Validation
*
* Validates Gradle Wrapper JAR Files
*
* [Action on GitHub](https://github.com/gradle/wrapper-validation-action)
*
* @param minWrapperCount Minimum number expected gradle-wrapper.jar files found in the repository.
* Non-negative number. Higher number is useful in monorepos where each project might have their own
* wrapper.
* @param allowSnapshots Allow Gradle snapshot versions during checksum verification. Boolean, true
* or false.
* @param allowChecksums Accept arbitrary user-defined checksums as valid. Comma separated list of
* SHA256 checksums (lowercase hex).
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
* the binding
* @param _customVersion Allows overriding action's version, for example to use a specific minor
* version, or a newer version that the binding doesn't yet know about
*/
public data class WrapperValidationActionV2 private constructor(
/**
* Minimum number expected gradle-wrapper.jar files found in the repository. Non-negative
* number. Higher number is useful in monorepos where each project might have their own wrapper.
*/
public val minWrapperCount: Int? = null,
/**
* Allow Gradle snapshot versions during checksum verification. Boolean, true or false.
*/
public val allowSnapshots: Boolean? = null,
/**
* Accept arbitrary user-defined checksums as valid. Comma separated list of SHA256 checksums
* (lowercase hex).
*/
public val allowChecksums: List<String>? = null,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
*/
public val _customInputs: Map<String, String> = mapOf(),
/**
* Allows overriding action's version, for example to use a specific minor version, or a newer
* version that the binding doesn't yet know about
*/
public val _customVersion: String? = null,
) : RegularAction<WrapperValidationActionV2.Outputs>("gradle", "wrapper-validation-action",
_customVersion ?: "v2") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
minWrapperCount: Int? = null,
allowSnapshots: Boolean? = null,
allowChecksums: List<String>? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(minWrapperCount=minWrapperCount, allowSnapshots=allowSnapshots,
allowChecksums=allowChecksums, _customInputs=_customInputs,
_customVersion=_customVersion)

@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
minWrapperCount?.let { "min-wrapper-count" to it.toString() },
allowSnapshots?.let { "allow-snapshots" to it.toString() },
allowChecksums?.let { "allow-checksums" to it.joinToString(",") },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)

public class Outputs(
stepId: String,
) : Action.Outputs(stepId) {
/**
* The path of the Gradle Wrapper(s) JAR that failed validation.
*/
public val failedWrapper: String = "steps.$stepId.outputs.failed-wrapper"
}
}

0 comments on commit 30f859e

Please sign in to comment.