feat: grow the tall Activity Overview card with the actual species count #108
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
| name: Build Docker Images | |
| # Multi-arch publishing: each image builds natively per architecture (no QEMU | |
| # — the backend's ML deps make emulated builds crawl), pushed by digest, then | |
| # the merge job stitches the digests into one multi-arch manifest per tag. | |
| # Tags only move in the merge job, which needs every build leg to succeed, so | |
| # a single-arch failure leaves the previous tags intact and install.sh's | |
| # workflow-completion check falls back to a local build — the same failure | |
| # mode as any CI failure before multi-arch. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, staging] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_PREFIX: ghcr.io/suncuss | |
| jobs: | |
| build: | |
| if: github.event.repository.visibility == 'public' | |
| runs-on: ${{ matrix.platform.runner }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| # Let the other legs finish on a failure: warms their build cache and | |
| # shows whether the breakage is arch-specific | |
| fail-fast: false | |
| matrix: | |
| image: | |
| - name: birdnet-pipy-backend | |
| context: ./backend | |
| - name: birdnet-pipy-frontend | |
| context: ./frontend | |
| - name: birdnet-pipy-icecast | |
| context: ./deployment/audio | |
| platform: | |
| - arch: amd64 | |
| runner: ubuntu-24.04 | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ${{ matrix.image.context }} | |
| platforms: linux/${{ matrix.platform.arch }} | |
| outputs: type=image,name=${{ env.IMAGE_PREFIX }}/${{ matrix.image.name }},push-by-digest=true,name-canonical=true,push=true | |
| cache-from: type=gha,scope=${{ matrix.image.name }}-${{ matrix.platform.arch }} | |
| cache-to: type=gha,mode=max,scope=${{ matrix.image.name }}-${{ matrix.platform.arch }} | |
| - name: Export digest | |
| run: | | |
| mkdir -p "${{ runner.temp }}/digests" | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "${{ runner.temp }}/digests/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: digests-${{ matrix.image.name }}-${{ matrix.platform.arch }} | |
| path: ${{ runner.temp }}/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| merge: | |
| if: github.event.repository.visibility == 'public' | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| permissions: | |
| packages: write | |
| strategy: | |
| matrix: | |
| image: | |
| - birdnet-pipy-backend | |
| - birdnet-pipy-frontend | |
| - birdnet-pipy-icecast | |
| steps: | |
| - name: Download digests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ runner.temp }}/digests | |
| pattern: digests-${{ matrix.image }}-* | |
| merge-multiple: true | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Create multi-arch manifest | |
| working-directory: ${{ runner.temp }}/digests | |
| run: | | |
| docker buildx imagetools create \ | |
| -t "${{ env.IMAGE_PREFIX }}/${{ matrix.image }}:${{ github.ref_name }}" \ | |
| $(printf -- "${{ env.IMAGE_PREFIX }}/${{ matrix.image }}@sha256:%s " *) | |
| - name: Inspect manifest | |
| run: docker buildx imagetools inspect "${{ env.IMAGE_PREFIX }}/${{ matrix.image }}:${{ github.ref_name }}" |