Commit f894fa3
## Description
The `setup_command` workflow parameter (added in #16) allows consuming
repos to run commands like `cargo fetch` before 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_key` secret to the sync workflow. When
provided, it populates the SSH agent (via `webfactory/ssh-agent`) before
the setup command runs, allowing commands like `cargo fetch` to 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 <[email protected]>
1 parent bcabfb7 commit f894fa3
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments