Skip to content

Commit

Permalink
feat(actions): add cachix/install-nix-action@v25
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 committed Jan 20, 2024
1 parent cf6ec78 commit 04bdc5c
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 16 deletions.
Empty file.
1 change: 1 addition & 0 deletions actions/cachix/install-nix-action/v25/commit-hash.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6004951b182f8860210c8d6f0d808ec5b1a33d28
4 changes: 2 additions & 2 deletions docs/supported-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Click on a version to see the binding's code.
* [browserslist-update-action](https://github.com/c2corg/browserslist-update-action) - v2 ✅: [`BrowserslistUpdateActionV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/c2corg/BrowserslistUpdateActionV2.kt)
* [transifex-pull-request-action](https://github.com/c2corg/transifex-pull-request-action) - v5 ✅: [`TransifexPullRequestActionV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/c2corg/TransifexPullRequestActionV5.kt)
* cachix
* [install-nix-action](https://github.com/cachix/install-nix-action) - v17: [`InstallNixActionV17`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV17.kt), v18: [`InstallNixActionV18`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV18.kt), v19: [`InstallNixActionV19`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV19.kt), v20: [`InstallNixActionV20`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV20.kt), v21: [`InstallNixActionV21`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV21.kt), v22: [`InstallNixActionV22`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV22.kt), v23: [`InstallNixActionV23`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV23.kt), v24: [`InstallNixActionV24`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV24.kt)
* [install-nix-action](https://github.com/cachix/install-nix-action) - v17: [`InstallNixActionV17`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV17.kt), v18: [`InstallNixActionV18`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV18.kt), v19: [`InstallNixActionV19`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV19.kt), v20: [`InstallNixActionV20`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV20.kt), v21: [`InstallNixActionV21`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV21.kt), v22: [`InstallNixActionV22`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV22.kt), v23: [`InstallNixActionV23`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV23.kt), v24: [`InstallNixActionV24`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV24.kt), v25: [`InstallNixActionV25`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV25.kt)
* codecov
* [codecov-action](https://github.com/codecov/codecov-action) - v3: [`CodecovActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/codecov/CodecovActionV3.kt)
* cycjimmy
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: 147
* counting each version separately: 148

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 @@ -38,8 +38,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV17 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV18 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV19 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV20 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV21 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV22 private constructor(
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,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: InstallNixActionV24",
replaceWith = ReplaceWith("InstallNixActionV24"),
message = "This action has a newer major version: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV23 private constructor(
/**
Expand Down
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.cachix
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.String
import kotlin.Suppress
import kotlin.Unit
Expand All @@ -38,6 +40,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: InstallNixActionV25",
replaceWith = ReplaceWith("InstallNixActionV25"),
)
public data class InstallNixActionV24 private constructor(
/**
* Gets appended to `/etc/nix/nix.conf` if passed.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// 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.cachix

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: Install Nix
*
* Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.
*
* [Action on GitHub](https://github.com/cachix/install-nix-action)
*
* @param extraNixConfig Gets appended to `/etc/nix/nix.conf` if passed.
* @param githubAccessToken Configure nix to pull from github using the given github token.
* @param installUrl Installation URL that will contain a script to install Nix.
* @param installOptions Additional installer flags passed to the installer script.
* @param nixPath Set NIX_PATH environment variable.
* @param enableKvm Enable KVM for hardware-accelerated virtualization on Linux, if available.
* @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 InstallNixActionV25 private constructor(
/**
* Gets appended to `/etc/nix/nix.conf` if passed.
*/
public val extraNixConfig: String? = null,
/**
* Configure nix to pull from github using the given github token.
*/
public val githubAccessToken: String? = null,
/**
* Installation URL that will contain a script to install Nix.
*/
public val installUrl: String? = null,
/**
* Additional installer flags passed to the installer script.
*/
public val installOptions: List<String>? = null,
/**
* Set NIX_PATH environment variable.
*/
public val nixPath: String? = null,
/**
* Enable KVM for hardware-accelerated virtualization on Linux, if available.
*/
public val enableKvm: 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>("cachix", "install-nix-action", _customVersion ?: "v25") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
extraNixConfig: String? = null,
githubAccessToken: String? = null,
installUrl: String? = null,
installOptions: List<String>? = null,
nixPath: String? = null,
enableKvm: Boolean? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(extraNixConfig=extraNixConfig, githubAccessToken=githubAccessToken,
installUrl=installUrl, installOptions=installOptions, nixPath=nixPath,
enableKvm=enableKvm, _customInputs=_customInputs, _customVersion=_customVersion)

@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
extraNixConfig?.let { "extra_nix_config" to it },
githubAccessToken?.let { "github_access_token" to it },
installUrl?.let { "install_url" to it },
installOptions?.let { "install_options" to it.joinToString("\n") },
nixPath?.let { "nix_path" to it },
enableKvm?.let { "enable_kvm" to it.toString() },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

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

0 comments on commit 04bdc5c

Please sign in to comment.