-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
2,710 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.github/workflows/test-script-consuming-jit-bindings-v1.main.do-not-compile.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.github/workflows/test-script-consuming-jit-bindings-v2.main.do-not-compile.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env kotlin | ||
@file:Repository("https://repo.maven.apache.org/maven2/") | ||
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.0.0") | ||
|
||
@file:Repository("http://localhost:8080/v2") | ||
|
||
// Regular, top-level action. | ||
@file:DependsOn("actions:checkout:v4") | ||
|
||
// Nested action. | ||
@file:DependsOn("gradle:actions__setup-gradle:v3") | ||
|
||
// Using specific version. | ||
@file:DependsOn("actions:cache:v3.3.3") | ||
|
||
// Always untyped action. | ||
@file:DependsOn("typesafegithub:always-untyped-action-for-tests:v1") | ||
|
||
import io.github.typesafegithub.workflows.actions.actions.Cache | ||
import io.github.typesafegithub.workflows.actions.actions.Checkout | ||
import io.github.typesafegithub.workflows.actions.actions.Checkout_Untyped | ||
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle | ||
import io.github.typesafegithub.workflows.actions.typesafegithub.AlwaysUntypedActionForTests_Untyped | ||
|
||
println(Checkout_Untyped(fetchTags_Untyped = "false")) | ||
println(Checkout(fetchTags = false)) | ||
println(Checkout(fetchTags_Untyped = "false")) | ||
println(AlwaysUntypedActionForTests_Untyped(foobar_Untyped = "baz")) | ||
println(ActionsSetupGradle()) | ||
println(Cache(path = listOf("some-path"), key = "some-key")) | ||
|
||
// Ensure that 'copy(...)' method is exposed. | ||
Checkout(fetchTags = false).copy(fetchTags = true) |
2 changes: 1 addition & 1 deletion
2
.github/workflows/test-script-consuming-jit-bindings.main.do-not-compile.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...ub/workflows/actionbindinggenerator/bindingsfromunittests/ActionBindingV2WithSubAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// 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.johnsmith | ||
|
||
import io.github.typesafegithub.workflows.domain.actions.Action | ||
import io.github.typesafegithub.workflows.domain.actions.RegularAction | ||
import java.util.LinkedHashMap | ||
import kotlin.ExposedCopyVisibility | ||
import kotlin.String | ||
import kotlin.Suppress | ||
import kotlin.Unit | ||
import kotlin.collections.Map | ||
|
||
/** | ||
* Action: Action With No Inputs | ||
* | ||
* Description | ||
* | ||
* [Action on GitHub](https://github.com/john-smith/action-binding-v2-with/tree/v3/sub/action) | ||
* | ||
* @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 | ||
*/ | ||
@ExposedCopyVisibility | ||
public data class ActionBindingV2WithSubAction private constructor( | ||
/** | ||
* 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>("john-smith", "action-binding-v2-with/sub/action", _customVersion ?: "v3") { | ||
init { | ||
println("WARNING: The used binding version v2 for john-smith/action-binding-v2-with/sub/action@v3 is experimental! Last stable version is v1.") | ||
if (System.getenv("GITHUB_ACTIONS").toBoolean()) { | ||
println(""" | ||
| | ||
|::warning title=Experimental Binding Version Used::The used binding version v2 for john-smith/action-binding-v2-with/sub/action@v3 is experimental! Last stable version is v1. | ||
""".trimMargin()) | ||
} | ||
|
||
} | ||
|
||
public constructor( | ||
vararg pleaseUseNamedArguments: Unit, | ||
_customInputs: Map<String, String> = mapOf(), | ||
_customVersion: String? = null, | ||
) : this(_customInputs = _customInputs, _customVersion = _customVersion) | ||
|
||
@Suppress("SpreadOperator") | ||
override fun toYamlArguments(): LinkedHashMap<String, String> = LinkedHashMap(_customInputs) | ||
|
||
override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId) | ||
} |
Oops, something went wrong.