Adds .github/actions/brencher/action.yml -- a composite reusable GitHub Action that:
Resolves the image tag from the current commit SHA (auto-<sha>).
Logs in to the configured Docker registry.
Builds the image with BuildKit and pushes it to the registry (with auto-<sha> and latest tags, plus a buildcache for layer reuse).
SSHes to the swarm manager, fetches the configured deploy branch, and runs docker stack deploy --prune --resolve-image-always -c <compose> <stack>.
Designed to be invoked from per-repo .github/workflows/deploy.yml files that watch for PR approval events.
Why
First step toward replacing brencher's manual UI-driven deploy loop with auto-deploy on PR approval (see #24 for the design discussion).
The action encapsulates the build + push + deploy pipeline as a reusable unit so any watched repo can wire it into its own workflow with a few with: inputs.
Companion PR
admin/reverseproxy (the torrserv_proxy stack) gets a .github/workflows/deploy.yml that invokes this action on PR approval. End-to-end pilot.
Open items (resolved empirically during pilot)
Where deploy_branches live on the swarm manager filesystem: assumed /opt/brencher-stacks/<stack_name> with the repo cloned at the configured deploy branch. If the layout differs in practice, the deploy step needs adjusting.
Secrets: REGISTRY_USERNAME, REGISTRY_PASSWORD, SWARM_MANAGER_HOST, SWARM_SSH_USER, SWARM_SSH_KEY -- need to be created in each watched repo.
## What
Adds `.github/actions/brencher/action.yml` -- a composite reusable GitHub Action that:
1. Resolves the image tag from the current commit SHA (`auto-<sha>`).
2. Logs in to the configured Docker registry.
3. Builds the image with BuildKit and pushes it to the registry (with `auto-<sha>` and `latest` tags, plus a `buildcache` for layer reuse).
4. SSHes to the swarm manager, fetches the configured deploy branch, and runs `docker stack deploy --prune --resolve-image-always -c <compose> <stack>`.
Designed to be invoked from per-repo `.github/workflows/deploy.yml` files that watch for PR approval events.
## Why
First step toward replacing brencher's manual UI-driven deploy loop with auto-deploy on PR approval (see #24 for the design discussion).
The action encapsulates the build + push + deploy pipeline as a reusable unit so any watched repo can wire it into its own workflow with a few `with:` inputs.
## Companion PR
`admin/reverseproxy` (the `torrserv_proxy` stack) gets a `.github/workflows/deploy.yml` that invokes this action on PR approval. End-to-end pilot.
## Open items (resolved empirically during pilot)
- Where deploy_branches live on the swarm manager filesystem: assumed `/opt/brencher-stacks/<stack_name>` with the repo cloned at the configured deploy branch. If the layout differs in practice, the deploy step needs adjusting.
- Secrets: `REGISTRY_USERNAME`, `REGISTRY_PASSWORD`, `SWARM_MANAGER_HOST`, `SWARM_SSH_USER`, `SWARM_SSH_KEY` -- need to be created in each watched repo.
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.
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
Adds
.github/actions/brencher/action.yml-- a composite reusable GitHub Action that:auto-<sha>).auto-<sha>andlatesttags, plus abuildcachefor layer reuse).docker stack deploy --prune --resolve-image-always -c <compose> <stack>.Designed to be invoked from per-repo
.github/workflows/deploy.ymlfiles that watch for PR approval events.Why
First step toward replacing brencher's manual UI-driven deploy loop with auto-deploy on PR approval (see #24 for the design discussion).
The action encapsulates the build + push + deploy pipeline as a reusable unit so any watched repo can wire it into its own workflow with a few
with:inputs.Companion PR
admin/reverseproxy(thetorrserv_proxystack) gets a.github/workflows/deploy.ymlthat invokes this action on PR approval. End-to-end pilot.Open items (resolved empirically during pilot)
/opt/brencher-stacks/<stack_name>with the repo cloned at the configured deploy branch. If the layout differs in practice, the deploy step needs adjusting.REGISTRY_USERNAME,REGISTRY_PASSWORD,SWARM_MANAGER_HOST,SWARM_SSH_USER,SWARM_SSH_KEY-- need to be created in each watched repo.175e32b07eto71a9e1b06bView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.