feat(reusables): add working_directory input to rust-ci + elixir-ci#186
Merged
Merged
Conversation
Stacked on #174. Adds a `working_directory` string input (default `.`) to both reusable workflows so wrappers can target a sub-crate or sub-app layout without re-implementing the workflow. What changes ------------ rust-ci-reusable.yml: - new `working_directory` input (default `.`) - each job declares `defaults.run.working-directory: ${{ inputs.working_directory }}` - `hashFiles('Cargo.toml')` guards now use `hashFiles(format('{0}/Cargo.toml', inputs.working_directory))` - Swatinem/rust-cache `workspaces:` parameter now passes the working directory so caches are keyed correctly per sub-crate elixir-ci-reusable.yml: - new `working_directory` input (default `.`) - job declares `defaults.run.working-directory` - `mix.exs` and `mix.lock` lookups + cache `path:` entries all consult the input via `format()` Why --- Audit of the 6 remaining elixir-ci.yml consumers and the 5 complex rust-ci.yml consumers (as of 2026-05-26): elixir (3 of 6 need this): - burble → server/ - feedback-o-tron → (working-directory) - verisimdb → (working-directory) rust (1 of 5 needs this; the rest use matrix dimensions, see below): - reasonably-good-token-vault → per-crate (vault-broker, rgtv-cli) Explicitly out of scope ----------------------- Multi-OS / multi-Rust-version / multi-crate matrices and `cross build` support are deferred. The 4 matrix-using rust-ci repos each use a different matrix dimension (`os` / `rust` / `workspaces` / `manifests`) — no single shared abstraction fits cleanly. They stay bespoke for now; re-evaluate after this lands and the wrapper sweep completes. Test plan --------- * YAML parse OK locally (python3 yaml.safe_load both files). * Cannot validate the input semantics without a runner. Wrapper end- to-end validation happens post-merge, same circular-validation caveat as PR #174 (pull_request runs the target-branch workflow). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #174. Adds a
working_directorystring input (default.) to both reusable workflows so wrappers can target a sub-crate or sub-app layout without re-implementing the workflow.What changes
rust-ci-reusable.yml:
working_directoryinput (default.)defaults.run.working-directory: ${{ inputs.working_directory }}hashFiles('Cargo.toml')guards now usehashFiles(format('{0}/Cargo.toml', inputs.working_directory))workspaces:parameter passes the working directory so caches are keyed per sub-crateelixir-ci-reusable.yml:
working_directoryinput (default.)defaults.run.working-directorymix.exsandmix.locklookups + cachepath:entries all consult the input viaformat()Why
Audit of the 6 remaining elixir-ci.yml consumers + the 5 complex rust-ci.yml consumers (as of 2026-05-26):
elixir (3 of 6 need this):
server/rust (1 of 5 needs this; the rest use matrix dimensions):
vault-broker,rgtv-cli)Explicitly out of scope
Multi-OS / multi-Rust-version / multi-crate matrices and
cross buildsupport are deferred. The 4 matrix-using rust-ci repos each use a different matrix dimension (os/rust/workspaces/manifests) — no single shared abstraction fits cleanly. They stay bespoke for now; re-evaluate after the current wrapper sweep completes.os(linux/macos/windows)rust(1.85, stable)crate(multi-workspace — covered byworking_directoryper-job)manifest(fuzz/Cargo.toml + rust-core/fuzz/Cargo.toml) + coverage + auditTest plan
pull_requestruns target-branch workflow, not the PR'sfeat/rust-ci-reusable; GitHub will retarget tomainautomatically once feat(governance): add rust-ci-reusable + elixir-ci-reusable workflows #174 merges)🤖 Generated with Claude Code