Skip to content

Commit b244868

Browse files
feat(actions): update ruby/setup-ruby@v1 (#1250)
Created automatically. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 644dc9c commit b244868

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
360dc864d5da99d54fcb8e9148c14a84b90d3e88
1+
22fdc77bf4148f810455b226c90fb81b5cbc00a7

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/ruby/SetupRubyV1.kt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ import kotlin.collections.toTypedArray
5757
* on GitHub-hosted runners or self-hosted runners with a very similar image to the ones used by
5858
* GitHub runners.
5959
* The default is to detect this automatically based on the OS, OS version and architecture.
60+
* @param windowsToolchain This input allows to override the default toolchain setup on Windows.
61+
* The default setting ('default') installs a toolchain based on the selected Ruby.
62+
* Specifically, it installs MSYS2 if not already there and installs mingw/ucrt/mswin build tools
63+
* and packages.
64+
* It also sets environment variables using 'ridk' or 'vcvars64.bat' based on the selected Ruby.
65+
* At present, the only other setting than 'default' is 'none', which only adds Ruby to PATH.
66+
* No build tools or packages are installed, nor are any ENV setting changed to activate them.
6067
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
6168
* the binding
6269
* @param _customVersion Allows overriding action's version, for example to use a specific minor
@@ -115,6 +122,16 @@ public data class SetupRubyV1 private constructor(
115122
* The default is to detect this automatically based on the OS, OS version and architecture.
116123
*/
117124
public val selfHosted: Boolean? = null,
125+
/**
126+
* This input allows to override the default toolchain setup on Windows.
127+
* The default setting ('default') installs a toolchain based on the selected Ruby.
128+
* Specifically, it installs MSYS2 if not already there and installs mingw/ucrt/mswin build
129+
* tools and packages.
130+
* It also sets environment variables using 'ridk' or 'vcvars64.bat' based on the selected Ruby.
131+
* At present, the only other setting than 'default' is 'none', which only adds Ruby to PATH.
132+
* No build tools or packages are installed, nor are any ENV setting changed to activate them.
133+
*/
134+
public val windowsToolchain: SetupRubyV1.WindowsToolchain? = null,
118135
/**
119136
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
120137
*/
@@ -134,11 +151,13 @@ public data class SetupRubyV1 private constructor(
134151
workingDirectory: String? = null,
135152
cacheVersion: String? = null,
136153
selfHosted: Boolean? = null,
154+
windowsToolchain: SetupRubyV1.WindowsToolchain? = null,
137155
_customInputs: Map<String, String> = mapOf(),
138156
_customVersion: String? = null,
139157
) : this(rubyVersion=rubyVersion, rubygems=rubygems, bundler=bundler, bundlerCache=bundlerCache,
140158
workingDirectory=workingDirectory, cacheVersion=cacheVersion, selfHosted=selfHosted,
141-
_customInputs=_customInputs, _customVersion=_customVersion)
159+
windowsToolchain=windowsToolchain, _customInputs=_customInputs,
160+
_customVersion=_customVersion)
142161

143162
@Suppress("SpreadOperator")
144163
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
@@ -150,12 +169,25 @@ public data class SetupRubyV1 private constructor(
150169
workingDirectory?.let { "working-directory" to it },
151170
cacheVersion?.let { "cache-version" to it },
152171
selfHosted?.let { "self-hosted" to it.toString() },
172+
windowsToolchain?.let { "windows-toolchain" to it.stringValue },
153173
*_customInputs.toList().toTypedArray(),
154174
).toTypedArray()
155175
)
156176

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

179+
public sealed class WindowsToolchain(
180+
public val stringValue: String,
181+
) {
182+
public object Default : SetupRubyV1.WindowsToolchain("default")
183+
184+
public object None : SetupRubyV1.WindowsToolchain("none")
185+
186+
public class Custom(
187+
customStringValue: String,
188+
) : SetupRubyV1.WindowsToolchain(customStringValue)
189+
}
190+
159191
public class Outputs(
160192
stepId: String,
161193
) : Action.Outputs(stepId) {

0 commit comments

Comments
 (0)