feat: rewrite dispatcher — poll for merged vault PRs, enforce admin approval #76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The edge dispatcher (
docker/edge/dispatcher.sh) currently pollsvault/actions/*.jsonand fires anything it finds — no approval gate. Rewrite it to use merged PRs as the trigger.New flow
git pullthe ops repo every 60svault/actions/for TOML files that do NOT have a corresponding.result.jsonsecretsarray — only inject those specific env vars into the runner container (read from.env.vault.enc, decrypt with SOPS, filter to declared secrets only)docker compose run --rm runner <formula> <action-id><action-id>.result.jsonwith exit code, timestamp, runner logs summaryAdmin enforcement
The dispatcher MUST verify that the TOML file entered main via a PR that was merged by a Forgejo admin. Use the Forgejo API to check the merge event. If the file appeared via direct push or non-admin merge, log a warning and skip it.
Secret filtering
Only secrets listed in the TOML
secretsarray get injected. The dispatcher decrypts.env.vault.enc, extracts only the named variables, and passes them via-e KEY=VALUEto the runner. Unknown secret names are rejected.What to change
docker/edge/dispatcher.sh(replace current content entirely)Verification
Dependencies
Depends on #73 (teardown), #74 (TOML schema).