docs(AGENTS): document Actions build delegation pattern
This commit is contained in:
@@ -97,3 +97,15 @@ When you add a stack, also:
|
||||
- Add the stack id to the `PROFILES` env var in the brencher stack
|
||||
compose (`docker_stack` / Swarm declarative) so it gets picked up on
|
||||
next rollout. The admin overlay is where this lives.
|
||||
|
||||
## Build delegation pattern (Actions)
|
||||
|
||||
Brencher does not run docker build or docker push itself. It dispatches a Gitea
|
||||
Actions workflow via `POST /api/v1/repos/{owner}/{repo}/actions/workflows/{file}/dispatches`,
|
||||
waits for the run to complete, then `docker compose pull` + `docker stack deploy`.
|
||||
|
||||
Use `steps.actions.GiteaActionsTrigger` and `steps.actions.GiteaActionsAwait`
|
||||
in the stack config, set `buildDocker=None` on `DockerSwarmDeploy`, and add
|
||||
`DockerComposePull` before deploy. Credentials come from brencher env
|
||||
(`GITEA_TOKEN`) and the compose image must point to a registry the runner can
|
||||
push to (e.g. Gitea Container Registry `gitea.rudolf.keenetic.link/<owner>/<repo>`).
|
||||
|
||||
Reference in New Issue
Block a user