Files
mqtt-security-test/.gitea/workflows/deploy.yml
T
RyanandClaude Sonnet 5.5 37ca9d4da1
Test and deploy enrollment demo / test (push) Successful in 36s
Test and deploy enrollment demo / deploy (push) Successful in 1m13s
Add Gitea restart workflow and link-style "Run again" for the public view
The server deployment cannot mount the Docker socket safely, so the web
view's button now opens the Gitea page for a workflow_dispatch workflow
that recreates the stack and replays the demo. Gitea handles who may run it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 21:54:24 +03:30

41 lines
1.4 KiB
YAML

name: Test and deploy enrollment demo
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: mqtt-security-test
cancel-in-progress: false
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate the compose files
run: |
docker compose -f docker/compose.yaml config -q
docker compose -f docker/compose.yaml -f docker/compose.restart.yaml config -q
- name: Build every image (compiles the Go, C and C++ programs)
run: docker compose -f docker/compose.yaml build
deploy:
needs: test
if: gitea.event_name != 'pull_request' && gitea.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy on the server's Docker daemon (viewer published on port 8099)
env:
VIEWER_BIND: "0.0.0.0"
RESTART_URL: https://git.my-rm.com/Robot-Market/mqtt-security-test/actions?workflow=restart.yml
COMPOSE_PROJECT_NAME: crypto-interop-spike
run: |
set -eu
# --force-recreate gives every deployment a fresh broker and a full new run of the demo.
docker compose -f docker/compose.yaml up -d --build --force-recreate --remove-orphans
- name: Wait for the run and require every board check to pass
env:
COMPOSE_PROJECT_NAME: crypto-interop-spike
run: sh scripts/ci-verify.sh