-
-
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
12 changed files
with
383 additions
and
6 deletions.
There are no files selected for viewing
Empty file.
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 @@ | ||
13aacd865c20de90d75de3b17ebe84f7a17d57d2 |
Empty file.
Empty file.
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
130 changes: 130 additions & 0 deletions
130
...ws-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CacheRestoreV4.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,130 @@ | ||
// 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.actions | ||
|
||
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.String | ||
import kotlin.Suppress | ||
import kotlin.Unit | ||
import kotlin.collections.List | ||
import kotlin.collections.Map | ||
import kotlin.collections.toList | ||
import kotlin.collections.toTypedArray | ||
|
||
/** | ||
* Action: Restore Cache | ||
* | ||
* Restore Cache artifacts like dependencies and build outputs to improve workflow execution time | ||
* | ||
* [Action on GitHub](https://github.com/actions/cache/tree/v4/restore) | ||
* | ||
* @param path A list of files, directories, and wildcard patterns to restore | ||
* @param key An explicit key for restoring the cache | ||
* @param restoreKeys An ordered list of keys to use for restoring stale cache if no cache hit | ||
* occurred for key. Note `cache-hit` returns false in this case. | ||
* @param enableCrossOsArchive An optional boolean when enabled, allows windows runners to restore | ||
* caches that were saved on other platforms | ||
* @param failOnCacheMiss Fail the workflow if cache entry is not found | ||
* @param lookupOnly Check if a cache entry exists for the given input(s) (key, restore-keys) | ||
* without downloading the cache | ||
* @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 CacheRestoreV4 private constructor( | ||
/** | ||
* A list of files, directories, and wildcard patterns to restore | ||
*/ | ||
public val path: List<String>, | ||
/** | ||
* An explicit key for restoring the cache | ||
*/ | ||
public val key: String, | ||
/** | ||
* An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. | ||
* Note `cache-hit` returns false in this case. | ||
*/ | ||
public val restoreKeys: List<String>? = null, | ||
/** | ||
* An optional boolean when enabled, allows windows runners to restore caches that were saved on | ||
* other platforms | ||
*/ | ||
public val enableCrossOsArchive: Boolean? = null, | ||
/** | ||
* Fail the workflow if cache entry is not found | ||
*/ | ||
public val failOnCacheMiss: Boolean? = null, | ||
/** | ||
* Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading | ||
* the cache | ||
*/ | ||
public val lookupOnly: Boolean? = 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<CacheRestoreV4.Outputs>("actions", "cache/restore", _customVersion ?: "v4") { | ||
public constructor( | ||
vararg pleaseUseNamedArguments: Unit, | ||
path: List<String>, | ||
key: String, | ||
restoreKeys: List<String>? = null, | ||
enableCrossOsArchive: Boolean? = null, | ||
failOnCacheMiss: Boolean? = null, | ||
lookupOnly: Boolean? = null, | ||
_customInputs: Map<String, String> = mapOf(), | ||
_customVersion: String? = null, | ||
) : this(path=path, key=key, restoreKeys=restoreKeys, enableCrossOsArchive=enableCrossOsArchive, | ||
failOnCacheMiss=failOnCacheMiss, lookupOnly=lookupOnly, _customInputs=_customInputs, | ||
_customVersion=_customVersion) | ||
|
||
@Suppress("SpreadOperator") | ||
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( | ||
*listOfNotNull( | ||
"path" to path.joinToString("\n"), | ||
"key" to key, | ||
restoreKeys?.let { "restore-keys" to it.joinToString("\n") }, | ||
enableCrossOsArchive?.let { "enableCrossOsArchive" to it.toString() }, | ||
failOnCacheMiss?.let { "fail-on-cache-miss" to it.toString() }, | ||
lookupOnly?.let { "lookup-only" to it.toString() }, | ||
*_customInputs.toList().toTypedArray(), | ||
).toTypedArray() | ||
) | ||
|
||
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) | ||
|
||
public class Outputs( | ||
stepId: String, | ||
) : Action.Outputs(stepId) { | ||
/** | ||
* A boolean value to indicate an exact match was found for the primary key | ||
*/ | ||
public val cacheHit: String = "steps.$stepId.outputs.cache-hit" | ||
|
||
/** | ||
* A resolved cache key for which cache match was attempted | ||
*/ | ||
public val cachePrimaryKey: String = "steps.$stepId.outputs.cache-primary-key" | ||
|
||
/** | ||
* Key of the cache that was restored, it could either be the primary key on cache-hit or a | ||
* partial/complete match of one of the restore keys | ||
*/ | ||
public val cacheMatchedKey: String = "steps.$stepId.outputs.cache-matched-key" | ||
} | ||
} |
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
93 changes: 93 additions & 0 deletions
93
...flows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/actions/CacheSaveV4.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,93 @@ | ||
// 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.actions | ||
|
||
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: Save a cache | ||
* | ||
* Save Cache artifacts like dependencies and build outputs to improve workflow execution time | ||
* | ||
* [Action on GitHub](https://github.com/actions/cache/tree/v4/save) | ||
* | ||
* @param path A list of files, directories, and wildcard patterns to cache | ||
* @param key An explicit key for saving the cache | ||
* @param uploadChunkSize The chunk size used to split up large files during upload, in bytes | ||
* @param enableCrossOsArchive An optional boolean when enabled, allows windows runners to save | ||
* caches that can be restored on other platforms | ||
* @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 CacheSaveV4 private constructor( | ||
/** | ||
* A list of files, directories, and wildcard patterns to cache | ||
*/ | ||
public val path: List<String>, | ||
/** | ||
* An explicit key for saving the cache | ||
*/ | ||
public val key: String, | ||
/** | ||
* The chunk size used to split up large files during upload, in bytes | ||
*/ | ||
public val uploadChunkSize: Int? = null, | ||
/** | ||
* An optional boolean when enabled, allows windows runners to save caches that can be restored | ||
* on other platforms | ||
*/ | ||
public val enableCrossOsArchive: Boolean? = 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>("actions", "cache/save", _customVersion ?: "v4") { | ||
public constructor( | ||
vararg pleaseUseNamedArguments: Unit, | ||
path: List<String>, | ||
key: String, | ||
uploadChunkSize: Int? = null, | ||
enableCrossOsArchive: Boolean? = null, | ||
_customInputs: Map<String, String> = mapOf(), | ||
_customVersion: String? = null, | ||
) : this(path=path, key=key, uploadChunkSize=uploadChunkSize, | ||
enableCrossOsArchive=enableCrossOsArchive, _customInputs=_customInputs, | ||
_customVersion=_customVersion) | ||
|
||
@Suppress("SpreadOperator") | ||
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( | ||
*listOfNotNull( | ||
"path" to path.joinToString("\n"), | ||
"key" to key, | ||
uploadChunkSize?.let { "upload-chunk-size" to it.toString() }, | ||
enableCrossOsArchive?.let { "enableCrossOsArchive" to it.toString() }, | ||
*_customInputs.toList().toTypedArray(), | ||
).toTypedArray() | ||
) | ||
|
||
override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId) | ||
} |
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
Oops, something went wrong.