Copies the SN-as-username process, the FN/SN comparison and the original R&D notes from the backend repo, links them from the README and stops documentation-only pushes from redeploying the demo. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
name: Test and deploy enrollment demo
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore: # documentation-only pushes do not redeploy the demo
|
|
- '**.md'
|
|
- 'docs/**'
|
|
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
|