Skip to content

Commit

Permalink
feat(actions): add actions/Borales/actions-yarn@v5
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 committed Feb 5, 2024
1 parent 891635a commit f670c22
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 4 deletions.
Empty file.
1 change: 1 addition & 0 deletions actions/Borales/actions-yarn/v5/commit-hash.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3766bb1335b98fb13c60eaf358fe20811b730a88
4 changes: 2 additions & 2 deletions docs/supported-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Click on a version to see the binding's code.
* bahmutov
* [npm-install](https://github.com/bahmutov/npm-install) - v1: [`NpmInstallV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/bahmutov/NpmInstallV1.kt)
* Borales
* [actions-yarn](https://github.com/Borales/actions-yarn) - v3: [`ActionsYarnV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/borales/ActionsYarnV3.kt), v4: [`ActionsYarnV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/borales/ActionsYarnV4.kt)
* [actions-yarn](https://github.com/Borales/actions-yarn) - v3: [`ActionsYarnV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/borales/ActionsYarnV3.kt), v4: [`ActionsYarnV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/borales/ActionsYarnV4.kt), v5: [`ActionsYarnV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/borales/ActionsYarnV5.kt)
* burrunan
* [gradle-cache-action](https://github.com/burrunan/gradle-cache-action) - v1 ✅: [`GradleCacheActionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/burrunan/GradleCacheActionV1.kt)
* c2corg
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: 150
* counting each version separately: 151

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 @@ -36,8 +36,8 @@ import kotlin.collections.toTypedArray
* version, or a newer version that the binding doesn't yet know about
*/
@Deprecated(
message = "This action has a newer major version: ActionsYarnV4",
replaceWith = ReplaceWith("ActionsYarnV4"),
message = "This action has a newer major version: ActionsYarnV5",
replaceWith = ReplaceWith("ActionsYarnV5"),
)
public data class ActionsYarnV3 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
"DEPRECATION",
)

package io.github.typesafegithub.workflows.actions.borales

import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
Expand All @@ -32,6 +34,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: ActionsYarnV5",
replaceWith = ReplaceWith("ActionsYarnV5"),
)
public data class ActionsYarnV4 private constructor(
/**
* Yarn command
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// 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.borales

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

/**
* Action: GitHub Action for Yarn
*
* Wraps the yarn CLI to enable common yarn commands
*
* [Action on GitHub](https://github.com/Borales/actions-yarn)
*
* @param cmd Yarn command
* @param dir Yarn sub-folder (if needed)
* @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 ActionsYarnV5 private constructor(
/**
* Yarn command
*/
public val cmd: String,
/**
* Yarn sub-folder (if needed)
*/
public val dir: 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<Action.Outputs>("Borales", "actions-yarn", _customVersion ?: "v5") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
cmd: String,
dir: String? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(cmd=cmd, dir=dir, _customInputs=_customInputs, _customVersion=_customVersion)

@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
"cmd" to cmd,
dir?.let { "dir" to it },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
}

0 comments on commit f670c22

Please sign in to comment.