@lead: externalize agent.yml inline scripts into .gitea/workflows/scripts/*.sh
Rebased onto the per-agent skill-scoping change so PR #25 carries both: - route.sh keeps the registry 'skills' allow-list and emits skills as a step output - install-opencode.sh writes the permission.skill block (deny-all + allow listed) Pure refactor otherwise: each step's shell moves to its own file, called via bash "$SCRIPTS/<name>.sh". The two extracted SKILL.md bodies are byte-identical to main; routing/config/publish behavior is unchanged. Because this is a reusable workflow (workflow_call) the runtime checkout is the caller's repo, so agent.yml now checks THIS repo out into .agents-workflow/ (pinned @main) and points $SCRIPTS there.
This commit is contained in:
@@ -47,6 +47,18 @@ jobs:
|
||||
That's the whole per-repo footprint. All the logic (agent registry, routing, delegation,
|
||||
reactions, PR/issue plumbing) lives here in `agent.yml`.
|
||||
|
||||
## Repo layout
|
||||
|
||||
`agent.yml` is kept thin: each step's shell lives in its own file under
|
||||
`.gitea/workflows/scripts/` (`route.sh`, `install-opencode.sh`, `skill-node1-ssh.sh`,
|
||||
`skill-gitea-api.sh`, `fetch-images.sh`, `fetch-thread.sh`, `run-agent.sh`,
|
||||
`build-activity-log.sh`, `publish.sh`), invoked as `bash "$SCRIPTS/<name>.sh"`.
|
||||
|
||||
Because this is a **reusable** workflow (`workflow_call`), a caller run checks out the *caller's*
|
||||
repo, not this one — so those script files aren't on disk by default. `agent.yml` therefore checks
|
||||
this repo out into `.agents-workflow/` (pinned to `@main`, matching the caller's `uses: …@main`) and
|
||||
points `$SCRIPTS` at it. Keep the workflow and its scripts moving together on `main`.
|
||||
|
||||
## Required secrets (per repo, or org-level for all)
|
||||
|
||||
| Secret | For |
|
||||
|
||||
Reference in New Issue
Block a user