feat(ci): add build-and-deploy (reusable) + approve-deploy workflows #1

Open
hermes wants to merge 1 commits from hermes/reverseproxy:main into main
First-time contributor

What

Adds .github/workflows/deploy.yml that triggers on PR approval (or manual dispatch) and invokes the brencher reusable action from admin/brencher to:

  1. Build the reverseproxy image and push it to registry.rudolf.keenetic.link with an auto-<sha> tag.
  2. SSH to the swarm manager, reset the deploy branch (deploy/torrserv_proxy) to origin, and run docker stack deploy --prune --resolve-image-always against docker-compose.yml.

Why

First end-to-end pilot of the auto-deploy design (see admin/brencher#24). The workflow uses pull_request_review event so that approval triggers a deploy.

Required secrets

  • REGISTRY_USERNAME, REGISTRY_PASSWORD -- registry.rudolf.keenetic.link
  • SWARM_MANAGER_HOST -- swarm manager host
  • SWARM_SSH_USER, SWARM_SSH_KEY -- SSH access for the deploy step

These need to be created in this repo before the workflow can actually run.

## What Adds `.github/workflows/deploy.yml` that triggers on PR approval (or manual dispatch) and invokes the brencher reusable action from `admin/brencher` to: 1. Build the reverseproxy image and push it to `registry.rudolf.keenetic.link` with an `auto-<sha>` tag. 2. SSH to the swarm manager, reset the deploy branch (`deploy/torrserv_proxy`) to origin, and run `docker stack deploy --prune --resolve-image-always` against `docker-compose.yml`. ## Why First end-to-end pilot of the auto-deploy design (see `admin/brencher#24`). The workflow uses `pull_request_review` event so that approval triggers a deploy. ## Required secrets - `REGISTRY_USERNAME`, `REGISTRY_PASSWORD` -- registry.rudolf.keenetic.link - `SWARM_MANAGER_HOST` -- swarm manager host - `SWARM_SSH_USER`, `SWARM_SSH_KEY` -- SSH access for the deploy step These need to be created in this repo before the workflow can actually run.
hermes force-pushed main from 53b9a3a06d to a2d2cab73b 2026-08-31 16:50:42 +02:00 Compare
hermes force-pushed main from a2d2cab73b to 09bbcb8972 2026-08-31 18:36:04 +02:00 Compare
hermes changed title from feat(ci): add auto-deploy workflow via brencher action to feat(ci): add build-and-deploy (reusable) + approve-deploy workflows 2026-08-31 18:36:30 +02:00
hermes added 1 commit 2026-08-31 19:53:05 +02:00
build-and-deploy.yml is a reusable workflow (workflow_call trigger)
that takes a ref, merges it locally on top of base_ref (no push),
builds the image and deploys the docker-compose stack to the swarm.

approve-deploy.yml is the per-repo trigger: watches for PR approval
(or manual dispatch), then invokes build-and-deploy with the PR head
SHA. No git push to any deploy branch -- the merge happens only in
the workflow runner's working directory.

When multiple repos start using these, the build-and-deploy workflow
can be lifted into admin/brencher/.github/workflows/ and referenced
cross-repo via admin/brencher/.github/workflows/build-and-deploy.yml@main.
hermes force-pushed main from 09bbcb8972 to c7554bee64 2026-08-31 19:53:05 +02:00 Compare
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u https://gitea.rudolf.keenetic.link/hermes/reverseproxy main:hermes-main
git checkout hermes-main
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/reverseproxy#1