feat(eventbus): platform-scope video.changed and viewers.count (#871) #150
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Publishes :develop multi-arch images on push to develop, gated by | |
| # per-image path filters. Stage pulls :develop; prod stays on :latest | |
| # (release.yml). Mirrors release.yml's matrix-on-native-runners + | |
| # manifest-list shape. | |
| name: Release Development | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| # Only build the newest develop merge. A push that lands while a prior run is | |
| # still building cancels that run, so rapid back-to-back merges don't fan out | |
| # into N parallel multi-arch builds all pulling base images from Docker Hub | |
| # (rate-limit avoidance). A superseded run's images would be immediately stale | |
| # anyway, since the next merge's HEAD is what stage deploys. | |
| concurrency: | |
| group: release-development | |
| cancel-in-progress: true | |
| jobs: | |
| # Per-image path filters. tripbot and vlc rebuild on any Go change to | |
| # their respective code surfaces; obs only rebuilds when its Dockerfile | |
| # context changes (the arm64 CEF compile is ~30 min, so skipping it on | |
| # Go-only merges is the load-bearing reason this job exists). | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tripbot: ${{ steps.filter.outputs.tripbot }} | |
| vlc: ${{ steps.filter.outputs.vlc }} | |
| obs: ${{ steps.filter.outputs.obs }} | |
| onscreens: ${{ steps.filter.outputs.onscreens }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v4 | |
| id: filter | |
| with: | |
| filters: | | |
| tripbot: | |
| - 'cmd/tripbot/**' | |
| - 'pkg/**' | |
| - 'infra/docker/tripbot/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.dockerignore' | |
| - '.github/workflows/release-development.yml' | |
| vlc: | |
| # The vlc container builds cmd/vlc-server, which transitively | |
| # imports packages outside its own cmd/pkg tree — e.g. pkg/obs, | |
| # pkg/instrumentation, pkg/telemetry, pkg/helpers. Match anything | |
| # under pkg/** so a change to any shared package triggers a vlc | |
| # rebuild — same shape as the tripbot filter above. Without this, | |
| # edits like the 2026-05-28 pkg/obs detangle silently ship a stale | |
| # vlc image because the narrow vlc-only globs don't match | |
| # pkg/obs/**. (onscreens-server is now its own image — see the | |
| # onscreens filter below.) | |
| - 'cmd/vlc-server/**' | |
| - 'pkg/**' | |
| - 'infra/docker/vlc/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.dockerignore' | |
| - '.github/workflows/release-development.yml' | |
| obs: | |
| - 'infra/docker/obs/**' | |
| - '.github/workflows/release-development.yml' | |
| onscreens: | |
| # onscreens-server is a pure-Go binary that transitively imports | |
| # shared packages (pkg/telemetry, pkg/instrumentation, pkg/helpers, | |
| # pkg/httpmw, …), so match pkg/** like the tripbot/vlc filters | |
| # rather than a narrow onscreens-only glob. | |
| - 'cmd/onscreens-server/**' | |
| - 'pkg/**' | |
| - 'infra/docker/onscreens-server/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.dockerignore' | |
| - '.github/workflows/release-development.yml' | |
| tripbot-build: | |
| needs: changes | |
| if: needs.changes.outputs.tripbot == 'true' | |
| name: tripbot-build (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Resolve develop version | |
| id: ver | |
| run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Generate tags | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: adanalife/tripbot | |
| flavor: | | |
| latest=false | |
| suffix=-${{ matrix.arch }} | |
| tags: | | |
| type=raw,value=develop | |
| - name: Build & push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: infra/docker/tripbot/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| push: true | |
| build-args: | | |
| VERSION=${{ steps.ver.outputs.value }} | |
| SHA=${{ github.sha }} | |
| cache-from: type=gha,scope=tripbot-${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=tripbot-${{ matrix.arch }} | |
| - name: Verify version stamping | |
| run: | | |
| IMAGE="adanalife/tripbot:develop-${{ matrix.arch }}" | |
| .github/scripts/verify-stamped-image.sh "$IMAGE" \ | |
| "${{ steps.ver.outputs.value }}" "${{ github.sha }}" | |
| tripbot-manifest: | |
| needs: tripbot-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create multi-arch manifest list | |
| run: | | |
| docker buildx imagetools create \ | |
| -t adanalife/tripbot:develop \ | |
| adanalife/tripbot:develop-amd64 \ | |
| adanalife/tripbot:develop-arm64 | |
| vlc-build: | |
| needs: changes | |
| if: needs.changes.outputs.vlc == 'true' | |
| name: vlc-build (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Resolve develop version | |
| id: ver | |
| run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Generate tags | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: adanalife/vlc | |
| flavor: | | |
| latest=false | |
| suffix=-${{ matrix.arch }} | |
| tags: | | |
| type=raw,value=develop | |
| - name: Build & push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: infra/docker/vlc/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| push: true | |
| build-args: | | |
| VERSION=${{ steps.ver.outputs.value }} | |
| SHA=${{ github.sha }} | |
| cache-from: type=gha,scope=vlc-${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=vlc-${{ matrix.arch }} | |
| - name: Verify version stamping | |
| run: | | |
| IMAGE="adanalife/vlc:develop-${{ matrix.arch }}" | |
| .github/scripts/verify-stamped-image.sh "$IMAGE" \ | |
| "${{ steps.ver.outputs.value }}" "${{ github.sha }}" | |
| vlc-manifest: | |
| needs: vlc-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create multi-arch manifest list | |
| run: | | |
| docker buildx imagetools create \ | |
| -t adanalife/vlc:develop \ | |
| adanalife/vlc:develop-amd64 \ | |
| adanalife/vlc:develop-arm64 | |
| obs-build: | |
| needs: changes | |
| if: needs.changes.outputs.obs == 'true' | |
| name: obs-build (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-latest | |
| dockerfile: infra/docker/obs/Dockerfile | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| dockerfile: infra/docker/obs/Dockerfile.arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Resolve develop version | |
| id: ver | |
| run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Generate tags | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: adanalife/obs | |
| flavor: | | |
| latest=false | |
| suffix=-${{ matrix.arch }} | |
| tags: | | |
| type=raw,value=develop | |
| - name: Build & push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| push: true | |
| build-args: | | |
| VERSION=${{ steps.ver.outputs.value }} | |
| SHA=${{ github.sha }} | |
| cache-from: type=gha,scope=obs-${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=obs-${{ matrix.arch }} | |
| - name: Verify version stamping | |
| run: | | |
| IMAGE="adanalife/obs:develop-${{ matrix.arch }}" | |
| .github/scripts/verify-stamped-image.sh "$IMAGE" \ | |
| "${{ steps.ver.outputs.value }}" "${{ github.sha }}" | |
| obs-manifest: | |
| needs: obs-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create multi-arch manifest list | |
| run: | | |
| docker buildx imagetools create \ | |
| -t adanalife/obs:develop \ | |
| adanalife/obs:develop-amd64 \ | |
| adanalife/obs:develop-arm64 | |
| onscreens-server-build: | |
| needs: changes | |
| if: needs.changes.outputs.onscreens == 'true' | |
| name: onscreens-server-build (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Resolve develop version | |
| id: ver | |
| run: echo "value=develop-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Generate tags | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: adanalife/onscreens-server | |
| flavor: | | |
| latest=false | |
| suffix=-${{ matrix.arch }} | |
| tags: | | |
| type=raw,value=develop | |
| - name: Build & push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: infra/docker/onscreens-server/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| push: true | |
| build-args: | | |
| VERSION=${{ steps.ver.outputs.value }} | |
| SHA=${{ github.sha }} | |
| cache-from: type=gha,scope=onscreens-server-${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=onscreens-server-${{ matrix.arch }} | |
| - name: Verify version stamping | |
| run: | | |
| IMAGE="adanalife/onscreens-server:develop-${{ matrix.arch }}" | |
| .github/scripts/verify-stamped-image.sh "$IMAGE" \ | |
| "${{ steps.ver.outputs.value }}" "${{ github.sha }}" | |
| onscreens-server-manifest: | |
| needs: onscreens-server-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create multi-arch manifest list | |
| run: | | |
| docker buildx imagetools create \ | |
| -t adanalife/onscreens-server:develop \ | |
| adanalife/onscreens-server:develop-amd64 \ | |
| adanalife/onscreens-server:develop-arm64 |