Skip to content

feat: Add frontend audio bridge and bot2bot demo #43

feat: Add frontend audio bridge and bot2bot demo

feat: Add frontend audio bridge and bot2bot demo #43

Workflow file for this run

name: Block Large Model Files
on: [pull_request]
jobs:
check-model-file-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check model file sizes
shell: bash
run: |
set -euo pipefail
echo "🔍 Checking model file sizes..."
base_sha="${{ github.event.pull_request.base.sha }}"
head_sha="${{ github.event.pull_request.head.sha }}"
mapfile -t model_files < <(
git diff --name-only --diff-filter=AM "$base_sha" "$head_sha" -- \
| grep -E '\.(ckpt|pt|bin|safetensors|onnx|pb|h5|tflite)$' || true
)
if [ "${#model_files[@]}" -eq 0 ]; then
echo "✔ No model files found."
exit 0
fi
echo "📁 Found model files:"
printf '%s\n' "${model_files[@]}"
for f in "${model_files[@]}"; do
if [ ! -f "$f" ]; then
echo "ℹ Skipping missing path in checkout: $f"
continue
fi
size=$(stat -c%s "$f")
echo "➡ File: $f ($size bytes)"
# 1MB = 1 * 1024 * 1024 = 1048576 bytes
if [ "$size" -ge 1048576 ]; then
echo "❌ ERROR: $f is too large (>1MB). Uploading prohibited."
exit 1
fi
done
echo "✔ All model files are smaller than 1MB."