Adds .github/workflows/deploy.yml that triggers on PR approval (or manual dispatch) and invokes the brencher reusable action from admin/brencher to:
Build the reverseproxy image and push it to registry.rudolf.keenetic.link with an auto-<sha> tag.
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.
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.
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.
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/workflows/deploy.ymlthat triggers on PR approval (or manual dispatch) and invokes the brencher reusable action fromadmin/brencherto:registry.rudolf.keenetic.linkwith anauto-<sha>tag.deploy/torrserv_proxy) to origin, and rundocker stack deploy --prune --resolve-image-alwaysagainstdocker-compose.yml.Why
First end-to-end pilot of the auto-deploy design (see
admin/brencher#24). The workflow usespull_request_reviewevent so that approval triggers a deploy.Required secrets
REGISTRY_USERNAME,REGISTRY_PASSWORD-- registry.rudolf.keenetic.linkSWARM_MANAGER_HOST-- swarm manager hostSWARM_SSH_USER,SWARM_SSH_KEY-- SSH access for the deploy stepThese need to be created in this repo before the workflow can actually run.
53b9a3a06dtoa2d2cab73ba2d2cab73bto09bbcb8972feat(ci): add auto-deploy workflow via brencher actionto feat(ci): add build-and-deploy (reusable) + approve-deploy workflows09bbcb8972toc7554bee64View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.