Replaces the inline DockerComposeBuild step in the torrserv_proxy config with a new GitHubActionTrigger step. Brencher no longer builds the image itself; it POSTs to /api/v1/repos/admin/reverseproxy/actions/workflows/build.yml/dispatches on the merge commit SHA, then polls the run to completion.
Files
backend/steps/git.py -- CheckoutMerged gets a new push_branch_template: str | None knob. When set, the merge commit is force-pushed to a branch whose name is built from the template (we use auto-deploy/torrserv_proxy/{commit_sha} here). CheckoutAndMergeResult gets a matching push_branch: str | None field so downstream steps can find it.
backend/steps/github_action.py -- new step. Dispatches a workflow on a configurable owner/repo (currently admin/reverseproxy), polls every poll_interval_seconds (default 15s) until status == completed, raises if conclusion != "success", otherwise returns the run id and the optional image_tag output.
backend/configs/torrserv_proxy.py -- wires it together: checkoutMerged gets push_branch_template="auto-deploy/torrserv_proxy/{commit_sha}", the new triggerAction step replaces buildDocker, and deployDocker.buildDocker=None.
Why
Closes the inline-docker-build loop in brencher for one stack, as a pilot for #34. The same GitHubActionTrigger will be reusable for any stack that wants to offload build to a per-repo workflow.
Required env / secrets
BRENCHER_GITEA_TOKEN -- a Gitea token with repo + actions scope on admin/reverseproxy.
The companion workflow admin/reverseproxy/.github/workflows/build.yml must already exist (it does, see admin/reverseproxy#1).
Deploy step
Left as-is per Alex's direction. deployDocker remains in the pipeline; only buildDocker=None.
Open items
DockerSwarmDeploy reads the image tag from envs=lambda: {"version": "auto-"+checkoutMerged.progress().version}. The action now produces its own auto-<ref> tag. Need to wire GitHubActionTrigger.progress().image_tag into deployDocker.envs once we know the action reliably emits it (see admin/reverseproxy#1 follow-up).
DockerComposeBuild is no longer referenced from this config but is still in the codebase as a step. Other configs may still use it; do not delete it from steps/docker.py.
## What
Replaces the inline `DockerComposeBuild` step in the `torrserv_proxy` config with a new `GitHubActionTrigger` step. Brencher no longer builds the image itself; it POSTs to `/api/v1/repos/admin/reverseproxy/actions/workflows/build.yml/dispatches` on the merge commit SHA, then polls the run to completion.
## Files
- `backend/steps/git.py` -- `CheckoutMerged` gets a new `push_branch_template: str | None` knob. When set, the merge commit is force-pushed to a branch whose name is built from the template (we use `auto-deploy/torrserv_proxy/{commit_sha}` here). `CheckoutAndMergeResult` gets a matching `push_branch: str | None` field so downstream steps can find it.
- `backend/steps/github_action.py` -- new step. Dispatches a workflow on a configurable `owner/repo` (currently `admin/reverseproxy`), polls every `poll_interval_seconds` (default 15s) until `status == completed`, raises if `conclusion != "success"`, otherwise returns the run id and the optional `image_tag` output.
- `backend/configs/torrserv_proxy.py` -- wires it together: `checkoutMerged` gets `push_branch_template="auto-deploy/torrserv_proxy/{commit_sha}"`, the new `triggerAction` step replaces `buildDocker`, and `deployDocker.buildDocker=None`.
## Why
Closes the inline-docker-build loop in brencher for one stack, as a pilot for #34. The same `GitHubActionTrigger` will be reusable for any stack that wants to offload build to a per-repo workflow.
## Required env / secrets
- `BRENCHER_GITEA_TOKEN` -- a Gitea token with repo + actions scope on `admin/reverseproxy`.
- The companion workflow `admin/reverseproxy/.github/workflows/build.yml` must already exist (it does, see admin/reverseproxy#1).
## Deploy step
Left as-is per Alex's direction. `deployDocker` remains in the pipeline; only `buildDocker=None`.
## Open items
- `DockerSwarmDeploy` reads the image tag from `envs=lambda: {"version": "auto-"+checkoutMerged.progress().version}`. The action now produces its own `auto-<ref>` tag. Need to wire `GitHubActionTrigger.progress().image_tag` into `deployDocker.envs` once we know the action reliably emits it (see admin/reverseproxy#1 follow-up).
- `DockerComposeBuild` is no longer referenced from this config but is still in the codebase as a step. Other configs may still use it; do not delete it from `steps/docker.py`.
Adds .github/actions/brencher/action.yml — a composite reusable
GitHub Action that builds a Docker image, pushes it to a registry,
and deploys a Docker Compose stack to a Swarm cluster via SSH.
Designed to be invoked from per-repo workflows that watch for PR
approval events; the caller supplies registry credentials, swarm
manager SSH details, and the stack / image names.
Companion PR in admin/reverseproxy wires this action into the
torrserv_proxy stack as the first end-to-end pilot.
Replace the inline DockerComposeBuild step in the torrserv_proxy
config with a new GitHubActionTrigger step that POSTs to
/api/v1/repos/admin/reverseproxy/actions/workflows/build.yml/dispatches
on the commit SHA produced by CheckoutMerged, then polls the run
status until completion.
CheckoutMerged gets a new push_branch_template knob so it pushes
the merge result to 'auto-deploy/torrserv_proxy/<commit_sha>'
on origin. That branch is what the workflow sees as its ref.
DockerSwarmDeploy stays in the pipeline (per Alex: "deploy step
leave as is") -- buildDocker is set to None since the image is
now produced by the action.
New step: backend/steps/github_action.py. Uses BRENCHER_GITEA_TOKEN
env var for auth.
Per Alex's feedback: the original push logic in CheckoutMerged that
auto-generates a branch named 'auto-{version}' from the merged commit
hashes is the convention we keep. Drop the push_branch_template knob
and the matching push_branch field on CheckoutAndMergeResult that
were introduced in the previous commit, so downstream steps get the
standard remote_branch_name back instead.
GitHubActionTrigger uses the merge commit_hash directly (commit_hash
field on CheckoutAndMergeResult, which is unaffected) for the
workflow ref, so we don't need a dedicated push_branch field.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Replaces the inline
DockerComposeBuildstep in thetorrserv_proxyconfig with a newGitHubActionTriggerstep. Brencher no longer builds the image itself; it POSTs to/api/v1/repos/admin/reverseproxy/actions/workflows/build.yml/dispatcheson the merge commit SHA, then polls the run to completion.Files
backend/steps/git.py--CheckoutMergedgets a newpush_branch_template: str | Noneknob. When set, the merge commit is force-pushed to a branch whose name is built from the template (we useauto-deploy/torrserv_proxy/{commit_sha}here).CheckoutAndMergeResultgets a matchingpush_branch: str | Nonefield so downstream steps can find it.backend/steps/github_action.py-- new step. Dispatches a workflow on a configurableowner/repo(currentlyadmin/reverseproxy), polls everypoll_interval_seconds(default 15s) untilstatus == completed, raises ifconclusion != "success", otherwise returns the run id and the optionalimage_tagoutput.backend/configs/torrserv_proxy.py-- wires it together:checkoutMergedgetspush_branch_template="auto-deploy/torrserv_proxy/{commit_sha}", the newtriggerActionstep replacesbuildDocker, anddeployDocker.buildDocker=None.Why
Closes the inline-docker-build loop in brencher for one stack, as a pilot for #34. The same
GitHubActionTriggerwill be reusable for any stack that wants to offload build to a per-repo workflow.Required env / secrets
BRENCHER_GITEA_TOKEN-- a Gitea token with repo + actions scope onadmin/reverseproxy.admin/reverseproxy/.github/workflows/build.ymlmust already exist (it does, see admin/reverseproxy#1).Deploy step
Left as-is per Alex's direction.
deployDockerremains in the pipeline; onlybuildDocker=None.Open items
DockerSwarmDeployreads the image tag fromenvs=lambda: {"version": "auto-"+checkoutMerged.progress().version}. The action now produces its ownauto-<ref>tag. Need to wireGitHubActionTrigger.progress().image_tagintodeployDocker.envsonce we know the action reliably emits it (see admin/reverseproxy#1 follow-up).DockerComposeBuildis no longer referenced from this config but is still in the codebase as a step. Other configs may still use it; do not delete it fromsteps/docker.py.Per Alex's feedback: the original push logic in CheckoutMerged that auto-generates a branch named 'auto-{version}' from the merged commit hashes is the convention we keep. Drop the push_branch_template knob and the matching push_branch field on CheckoutAndMergeResult that were introduced in the previous commit, so downstream steps get the standard remote_branch_name back instead. GitHubActionTrigger uses the merge commit_hash directly (commit_hash field on CheckoutAndMergeResult, which is unaffected) for the workflow ref, so we don't need a dedicated push_branch field.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.