Class RunScript
-
- All Implemented Interfaces:
-
io.typeflows.util.Renderable
public final class RunScript extends BaseRun
A workflow step that executes a shell script loaded from the classpath.
RunScript provides the ability to execute longer, more complex shell scripts that are stored as resources within the project. The script is automatically loaded from the classpath, preprocessed to remove shebang lines and redundant set directives (since GitHub Actions enables these by default), and then executed in the runner environment. This is ideal for complex automation tasks that benefit from being maintained as separate script files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRunScript.Companion
-
Field Summary
Fields Modifier and Type Field Description public final Stringshellpublic final IntegertimeoutMinutespublic final BooleancontinueOnErrorpublic final StringworkingDirectorypublic final Map<String, Object>envprivate final Stringnamepublic final Stringidpublic final Expressionconditionpublic final Map<String, Object>extrapublic final static RunScript.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final StringgetName()final static RunScriptcreate(String scriptPath, String name, Configure<BaseRun.DSL> step)Creates and configures a RunScript instance. final static RunScriptcreate(String scriptPath, String name)Creates and configures a RunScript instance. final static RunScriptcreate(String scriptPath)Creates and configures a RunScript instance. -
-
Method Detail
-
create
@JvmOverloads() final static RunScript create(String scriptPath, String name, Configure<BaseRun.DSL> step)
Creates and configures a RunScript instance.
- Parameters:
scriptPath- Path to the script resource in the classpathname- Optional name for the step (for logging and identification)step- Configuration lambda to customize the step- Returns:
Configured RunScript instance
-
create
@JvmOverloads() final static RunScript create(String scriptPath, String name)
Creates and configures a RunScript instance.
- Parameters:
scriptPath- Path to the script resource in the classpathname- Optional name for the step (for logging and identification)- Returns:
Configured RunScript instance
-
create
@JvmOverloads() final static RunScript create(String scriptPath)
Creates and configures a RunScript instance.
- Parameters:
scriptPath- Path to the script resource in the classpath- Returns:
Configured RunScript instance
-
-
-
-