Compare commits

...

2 Commits

Author SHA1 Message Date
bahdotsh
b1cc74639c version fix 2025-09-05 08:22:15 +05:30
bahdotsh
f45babc605 fix(docker): mount GitHub environment files directory into containers
- Mount GitHub environment files directory containing GITHUB_ENV, GITHUB_OUTPUT, GITHUB_PATH, and GITHUB_STEP_SUMMARY
- Resolves Docker container exit code -1 when writing to $GITHUB_ENV
- Update volume mapping in both step execution contexts in engine.rs
- Tested on macOS with Docker Desktop

Closes: Issue where echo "VAR=value" >> "$GITHUB_ENV" fails in Docker runtime
2025-09-05 08:01:29 +05:30
18 changed files with 47 additions and 54 deletions

View File

@@ -15,19 +15,19 @@ license = "MIT"
[workspace.dependencies]
# Internal crate dependencies
wrkflw-models = { path = "crates/models", version = "0.7.2" }
wrkflw-evaluator = { path = "crates/evaluator", version = "0.7.2" }
wrkflw-executor = { path = "crates/executor", version = "0.7.2" }
wrkflw-github = { path = "crates/github", version = "0.7.2" }
wrkflw-gitlab = { path = "crates/gitlab", version = "0.7.2" }
wrkflw-logging = { path = "crates/logging", version = "0.7.2" }
wrkflw-matrix = { path = "crates/matrix", version = "0.7.2" }
wrkflw-parser = { path = "crates/parser", version = "0.7.2" }
wrkflw-runtime = { path = "crates/runtime", version = "0.7.2" }
wrkflw-secrets = { path = "crates/secrets", version = "0.7.2" }
wrkflw-ui = { path = "crates/ui", version = "0.7.2" }
wrkflw-utils = { path = "crates/utils", version = "0.7.2" }
wrkflw-validators = { path = "crates/validators", version = "0.7.2" }
wrkflw-models = { path = "crates/models", version = "0.7.3" }
wrkflw-evaluator = { path = "crates/evaluator", version = "0.7.3" }
wrkflw-executor = { path = "crates/executor", version = "0.7.3" }
wrkflw-github = { path = "crates/github", version = "0.7.3" }
wrkflw-gitlab = { path = "crates/gitlab", version = "0.7.3" }
wrkflw-logging = { path = "crates/logging", version = "0.7.3" }
wrkflw-matrix = { path = "crates/matrix", version = "0.7.3" }
wrkflw-parser = { path = "crates/parser", version = "0.7.3" }
wrkflw-runtime = { path = "crates/runtime", version = "0.7.3" }
wrkflw-secrets = { path = "crates/secrets", version = "0.7.3" }
wrkflw-ui = { path = "crates/ui", version = "0.7.3" }
wrkflw-utils = { path = "crates/utils", version = "0.7.3" }
wrkflw-validators = { path = "crates/validators", version = "0.7.3" }
# External dependencies
clap = { version = "4.3", features = ["derive"] }

View File

@@ -1,12 +0,0 @@
name: Clippy Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Test secrets after clippy fixes
env:
TEST_VAR: ${{ secrets.TEST_SECRET }}
run: |
echo "Secret length: ${#TEST_VAR}"

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-evaluator"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Workflow evaluation functionality for wrkflw execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-executor"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Workflow execution engine for wrkflw"
license.workspace = true

View File

@@ -1538,7 +1538,16 @@ async fn execute_step(ctx: StepExecutionContext<'_>) -> Result<StepResult, Execu
let container_workspace = Path::new("/github/workspace");
// Set up volume mapping from host working dir to container workspace
let volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)];
let mut volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)];
// Also mount the GitHub environment files directory if GITHUB_ENV is set
if let Some(github_env_path) = ctx.job_env.get("GITHUB_ENV") {
if let Some(github_dir) = Path::new(github_env_path).parent() {
if let Some(github_parent) = github_dir.parent() {
volumes.push((github_parent, github_parent));
}
}
}
let output = ctx
.runtime
@@ -1687,7 +1696,16 @@ async fn execute_step(ctx: StepExecutionContext<'_>) -> Result<StepResult, Execu
let container_workspace = Path::new("/github/workspace");
// Set up volume mapping from host working dir to container workspace
let volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)];
let mut volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)];
// Also mount the GitHub environment files directory if GITHUB_ENV is set
if let Some(github_env_path) = ctx.job_env.get("GITHUB_ENV") {
if let Some(github_dir) = Path::new(github_env_path).parent() {
if let Some(github_parent) = github_dir.parent() {
volumes.push((github_parent, github_parent));
}
}
}
// Execute the command
match ctx

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-github"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "GitHub API integration for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-gitlab"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "GitLab API integration for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-logging"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Logging functionality for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-matrix"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Matrix job parallelization for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-models"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Data models and structures for wrkflw workflow execution engine"
license.workspace = true
@@ -14,4 +14,4 @@ categories.workspace = true
serde.workspace = true
serde_yaml.workspace = true
serde_json.workspace = true
thiserror.workspace = true
thiserror.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-parser"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Workflow parsing functionality for wrkflw execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-runtime"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Runtime execution environment for wrkflw workflow engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-secrets"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Secrets management for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-ui"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Terminal user interface for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-utils"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Utility functions for wrkflw workflow execution engine"
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "wrkflw-validators"
version.workspace = true
version = "0.7.3"
edition.workspace = true
description = "Workflow validation functionality for wrkflw execution engine"
license.workspace = true

View File

@@ -1,13 +0,0 @@
name: Final Secrets Test
on: [push]
jobs:
verify-secrets:
runs-on: ubuntu-latest
steps:
- name: Test secrets are working
env:
SECRET_VAL: ${{ secrets.TEST_SECRET }}
run: |
echo "Secret length: ${#SECRET_VAL}"
echo "All secrets functionality verified!"