Commit af5cd0c
ci(reusables): gate Radicle mirror + Instant Sync dispatch on secret presence (auto-fixes 65 repos) (#305)
## Summary
Two source-level fixes in shared workflows. Zero fan-out PRs needed —
both fixes auto-propagate to every caller via the existing
reusable/standalone patterns.
## Fix 1: `mirror-reusable.yml` mirror-radicle (26 repos auto-fixed)
**Root cause:** mirror-radicle's three working steps fired
unconditionally when `vars.RADICLE_MIRROR_ENABLED == 'true'`, even when
`secrets.RADICLE_KEY` was empty. The `echo > ~/.radicle/keys/radicle`
write also failed because the parent directory `~/.radicle/keys/`
doesn't exist by default.
**Fix:**
- `if: \${{ secrets.RADICLE_KEY != '' }}` on Setup Rust / Install
Radicle / Mirror to Radicle steps
- `mkdir -p ~/.radicle/keys` before the key write
- New inverse-gate "Skipped" advisory step that prints a `::notice`
instead of failing
## Fix 2: `instant-sync.yml` dispatch (39 repos auto-fixed)
**Root cause:** `peter-evans/repository-dispatch` ran unconditionally on
every push; without `secrets.FARM_DISPATCH_TOKEN` the action falls back
to `GITHUB_TOKEN`, which cannot dispatch cross-repo and returns HTTP 401
"Bad credentials".
**Fix:**
- `if: \${{ secrets.FARM_DISPATCH_TOKEN != '' }}` on the Trigger
Propagation step
- Inverse-gate `::notice` advisory step
## Why source-level
Both files are imported via `workflow_call` / direct-paste templates
across ~289 estate caller wrappers. Source-level gate = automatic
per-repo fix.
## Owner action for full activation (optional)
- mirror-radicle: configure `RADICLE_KEY` (per-repo or org-level
secret).
- instant-sync: configure org-level `FARM_DISPATCH_TOKEN` PAT with repo
scope.
This PR makes those owner actions **optional** — without the secret the
workflow is no-op; with the secret it works.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fee07db commit af5cd0c
2 files changed
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
32 | 47 | | |
33 | 48 | | |
34 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
159 | 169 | | |
| 170 | + | |
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
163 | 174 | | |
| 175 | + | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
| 180 | + | |
168 | 181 | | |
| 182 | + | |
169 | 183 | | |
170 | 184 | | |
171 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
0 commit comments