mirror of
https://github.com/bahdotsh/wrkflw.git
synced 2026-02-24 03:49:45 +01:00
Previously, `run` steps in Docker jobs were failing due to several issues: - They were hardcoded to use `ubuntu:latest`, which often lacked necessary tools like `cargo`. - Even when the image was correct, the host workspace directory was not properly mapped into the container, preventing access to source files. This commit addresses these issues by: - Using the correct runner image specified by the job's `runs_on` field for `run` steps, instead of always defaulting to `ubuntu:latest`. - Updating the `get_runner_image` function to map `macos-latest` runners to `rust:latest` to ensure the Rust toolchain is available for relevant workflows. - Correctly mapping the host working directory to `/github/workspace` within the container for `run` steps. - Setting the container's working directory to `/github/workspace` when executing `run` steps. This allows commands like `cargo build` and `cargo test` within `run` steps to find both the necessary tools and the project source code inside the container.