Files
Adriano Machado 53e83b3dbd fix: resolve matrix expressions in step with values before execution (#115)
* fix: resolve matrix expressions in step `with` values before execution

${{ matrix.X }} references in step `with` maps were never substituted,
causing detect_setup_runtimes to reject them as invalid versions (the
visible symptom), and silently passing literal expression strings into
INPUT_* env vars for Docker, container, and composite action steps.

Fix: add apply_matrix_to_steps (substitution.rs) which clones steps and
runs preprocess_command on all `with` values before execution begins.
execute_matrix_job now materialises steps once at the top and uses them
for both resolve_runner_image and the step iteration loop. Other
expression types (${{ secrets.X }}, ${{ steps.foo.outputs.bar }}) are
left intact for existing per-step resolution.

Note: INPUT_* env vars that contain non-matrix expressions (${{ env.X }},
${{ secrets.X }}) are still passed unresolved at the raw-with-access
sites; that is a separate gap not addressed here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Adriano Machado <60320+ammachado@users.noreply.github.com>

* fix: preserve original expression in with-values for unresolved matrix keys

preprocess_command was designed for shell run: strings and escapes
unresolvable ${{ matrix.X }} references as \${{ matrix.X }} to protect
the shell. Reusing it for with: values was wrong because with-values are
data, not shell text — the backslash corrupts INPUT_* env vars and
prevents downstream resolvers (which match ${{ not \${{) from handling
the expression.

apply_matrix_to_steps now uses MATRIX_PATTERN directly and falls back to
the original expression for missing or non-scalar matrix values.

Also tightens the unknown-key test to assert the exact preserved form
rather than a negation that would pass for both the correct and broken output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Signed-off-by: Adriano Machado <60320+ammachado@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 10:03:19 +05:30
..
2026-04-22 00:22:41 +05:30

wrkflw-parser

Parsers and schema helpers for GitHub/GitLab workflow files.

  • GitHub Actions workflow parsing and JSON Schema validation
  • GitLab CI parsing helpers

Example

// High-level crates (`wrkflw` and `wrkflw-executor`) wrap parser usage.
// Use those unless you are extending parsing behavior directly.