diff --git a/crates/executor/src/engine.rs b/crates/executor/src/engine.rs index 10a9594..2bfa116 100644 --- a/crates/executor/src/engine.rs +++ b/crates/executor/src/engine.rs @@ -570,7 +570,7 @@ async fn prepare_action( } else { // It's a JavaScript or composite action // For simplicity, we'll use node to run it (this would need more work for full support) - return Ok("node:16-buster-slim".to_string()); + return Ok("node:20-slim".to_string()); } } @@ -628,7 +628,7 @@ fn determine_action_image(repository: &str) -> String { { "catthehacker/ubuntu:act-latest".to_string() // Use act runner image for core actions } else { - "node:16-buster-slim".to_string() // Default for other actions + "node:20-slim".to_string() // Default for other actions } } } @@ -1224,13 +1224,15 @@ async fn execute_step(ctx: StepExecutionContext<'_>) -> Result = Vec::new(); // Keep strings alive until after we use cmd // Special handling for Rust actions - if uses.starts_with("actions-rs/") { + if uses.starts_with("actions-rs/") || uses.starts_with("dtolnay/rust-toolchain") { wrkflw_logging::info( "🔄 Detected Rust action - using system Rust installation", ); // For toolchain action, verify Rust is installed - if uses.starts_with("actions-rs/toolchain@") { + if uses.starts_with("actions-rs/toolchain@") + || uses.starts_with("dtolnay/rust-toolchain@") + { let rustc_version = Command::new("rustc") .arg("--version") .output() @@ -1556,7 +1558,7 @@ async fn execute_step(ctx: StepExecutionContext<'_>) -> Result String { // Map GitHub runners to Docker images match runs_on.trim() { - // ubuntu runners - micro images (minimal size) - "ubuntu-latest" => "node:16-buster-slim", - "ubuntu-22.04" => "node:16-bullseye-slim", - "ubuntu-20.04" => "node:16-buster-slim", - "ubuntu-18.04" => "node:16-buster-slim", + // ubuntu runners - using Ubuntu base images for better compatibility + "ubuntu-latest" => "ubuntu:latest", + "ubuntu-22.04" => "ubuntu:22.04", + "ubuntu-20.04" => "ubuntu:20.04", + "ubuntu-18.04" => "ubuntu:18.04", // ubuntu runners - medium images (with more tools) "ubuntu-latest-medium" => "catthehacker/ubuntu:act-latest", diff --git a/crates/runtime/src/emulation.rs b/crates/runtime/src/emulation.rs index 04c9549..a70292f 100644 --- a/crates/runtime/src/emulation.rs +++ b/crates/runtime/src/emulation.rs @@ -643,6 +643,15 @@ pub async fn handle_special_action(action: &str) -> Result<(), ContainerError> { wrkflw_logging::info(&format!("🔄 Detected Rust formatter action: {}", action)); check_command_available("rustfmt", "rustfmt", "rustup component add rustfmt"); + } else if action.starts_with("dtolnay/rust-toolchain@") { + // For dtolnay/rust-toolchain action, check for Rust installation + wrkflw_logging::info(&format!( + "🔄 Detected dtolnay Rust toolchain action: {}", + action + )); + + check_command_available("rustc", "Rust", "https://rustup.rs/"); + check_command_available("cargo", "Cargo", "https://rustup.rs/"); } else if action.starts_with("actions/setup-node@") { // Node.js setup action wrkflw_logging::info(&format!("🔄 Detected Node.js setup action: {}", action));