Add ssh_key secret parameter to support sync setup_command.#22
Merged
Add ssh_key secret parameter to support sync setup_command.#22
ssh_key secret parameter to support sync setup_command.#22Conversation
danielpeng2
approved these changes
Apr 14, 2026
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.

Description
The
setup_commandworkflow parameter (added in #16) allows consuming repos to run commands likecargo fetchbefore sync begins. However, if the source repo has private dependencies that require SSH credentials (e.g. private crates), there's no way to provide them — the reusable workflow runs in a separate job, so the embedding workflow can't set up the SSH agent beforehand.This adds an optional
ssh_keysecret to the sync workflow. When provided, it populates the SSH agent (viawebfactory/ssh-agent) before the setup command runs, allowing commands likecargo fetchto access private repositories.Testing
Verified the workflow YAML is syntactically valid. The new step is conditional on
secrets.ssh_key != '', so existing consumers that don't pass the secret are unaffected.Co-Authored-By: Oz oz-agent@warp.dev