1+ #! /usr/bin/env bash
2+ # ═══════════════════════════════════════════════════════════════════════════
3+ # Runner Setup Script - Installs dependencies for README animation workflow
4+ # Run this ONCE on the self-hosted runner
5+ # ═══════════════════════════════════════════════════════════════════════════
6+
7+ set -euo pipefail
8+
9+ echo " ═══════════════════════════════════════════════════════════════════════════"
10+ echo " ARAS-Workspace Runner Setup"
11+ echo " ═══════════════════════════════════════════════════════════════════════════"
12+ echo
13+
14+ # ─────────────────────────────────────────────────────────────
15+ # 1. Install asciinema
16+ # ─────────────────────────────────────────────────────────────
17+
18+ echo " [1/3] Installing asciinema..."
19+
20+ if command -v asciinema & > /dev/null; then
21+ echo " ✅ asciinema already installed: $( asciinema --version) "
22+ else
23+ apt-get update
24+ apt-get install -y asciinema
25+ echo " ✅ asciinema installed: $( asciinema --version) "
26+ fi
27+
28+ # ─────────────────────────────────────────────────────────────
29+ # 2. Install additional dependencies
30+ # ─────────────────────────────────────────────────────────────
31+
32+ echo " [2/3] Installing dependencies (jq, bc, curl)..."
33+
34+ apt-get install -y jq bc curl
35+ echo " ✅ Dependencies installed"
36+
37+ # ─────────────────────────────────────────────────────────────
38+ # 3. Build agg Docker image
39+ # ─────────────────────────────────────────────────────────────
40+
41+ echo " [3/3] Building agg Docker image..."
42+
43+ if docker images | grep -q " ^agg " ; then
44+ echo " ⚠️ agg image exists, rebuilding..."
45+ fi
46+
47+ docker build -t agg:latest https://github.com/asciinema/agg.git
48+
49+ echo " ✅ agg image built"
50+
51+ # ─────────────────────────────────────────────────────────────
52+ # Verification
53+ # ─────────────────────────────────────────────────────────────
54+
55+ echo
56+ echo " ═══════════════════════════════════════════════════════════════════════════"
57+ echo " Verification"
58+ echo " ═══════════════════════════════════════════════════════════════════════════"
59+
60+ echo -n " asciinema: "
61+ command -v asciinema && asciinema --version || echo " ❌ NOT FOUND"
62+
63+ echo -n " docker: "
64+ command -v docker && docker --version || echo " ❌ NOT FOUND"
65+
66+ echo -n " agg image: "
67+ docker images agg:latest --format " {{.Repository}}:{{.Tag}} ({{.Size}})" || echo " ❌ NOT FOUND"
68+
69+ echo
70+ echo " ═══════════════════════════════════════════════════════════════════════════"
71+ echo " ✅ Setup complete! Runner is ready for README animation workflow."
72+ echo " ═══════════════════════════════════════════════════════════════════════════"
0 commit comments