2323 - name : Checkout code
2424 uses : actions/checkout@v4
2525
26- # 2️⃣ Detect changed folders
26+ # 2️⃣ Detect changed demo folders
2727 - name : Detect changed demo folders
2828 id : changes
2929 uses : dorny/paths-filter@v3
3434 demo2:
3535 - 'demo/demo-2-otel/**'
3636
37- # 3️⃣ Install Podman (only if needed)
37+ # 3️⃣ HARD CLEAN – Free disk space (CRITICAL)
38+ - name : Hard cleanup previous Podman state
39+ if : steps.changes.outputs.demo1 == 'true' || steps.changes.outputs.demo2 == 'true'
40+ run : |
41+ echo "🔥 Cleaning previous Podman data"
42+
43+ podman ps -aq && podman stop -a || true
44+ podman system prune -af --volumes || true
45+
46+ rm -rf $GITHUB_WORKSPACE/containers || true
47+ rm -rf $GITHUB_WORKSPACE/runroot || true
48+ rm -rf $GITHUB_WORKSPACE/tmp || true
49+
50+ sudo rm -rf /tmp/* || true
51+
52+ # 4️⃣ Install Podman & podman-compose
3853 - name : Install Podman
3954 if : steps.changes.outputs.demo1 == 'true' || steps.changes.outputs.demo2 == 'true'
4055 run : |
4358 pip install --no-cache-dir podman-compose
4459 podman --version
4560
46- # 4️⃣ Configure Podman storage & temp (CRITICAL FIX)
61+ # 5️⃣ Configure Podman storage & temp
4762 - name : Configure Podman storage
4863 if : steps.changes.outputs.demo1 == 'true' || steps.changes.outputs.demo2 == 'true'
4964 run : |
@@ -63,13 +78,12 @@ jobs:
6378
6479 echo "TMPDIR=$TMP_ROOT" >> $GITHUB_ENV
6580 echo "PIP_NO_CACHE_DIR=1" >> $GITHUB_ENV
66- echo "HF_HOME=$TMP_ROOT/huggingface" >> $GITHUB_ENV
67- echo "TRANSFORMERS_CACHE=$TMP_ROOT/huggingface/transformers" >> $GITHUB_ENV
6881 echo "BUILDAH_FORMAT=docker" >> $GITHUB_ENV
82+ echo "PODMAN_LOG_LEVEL=error" >> $GITHUB_ENV
6983
7084 podman system migrate
7185
72- # 5️⃣ Ensure Podman network
86+ # 6️⃣ Ensure Podman network
7387 - name : Ensure Podman network
7488 if : steps.changes.outputs.demo1 == 'true' || steps.changes.outputs.demo2 == 'true'
7589 run : |
@@ -83,14 +97,10 @@ jobs:
8397 working-directory : demo/demo-1-basics
8498 run : |
8599 echo "Running Demo-1..."
86- podman-compose build
100+ podman-compose build --no-cache
87101 podman-compose up -d
88102 podman ps
89103
90- - name : Prune after Demo-1
91- if : steps.changes.outputs.demo1 == 'true'
92- run : podman system prune -af --volumes
93-
94104 # ===============================
95105 # 🚀 DEMO-2 – OTEL CORE
96106 # ===============================
99109 working-directory : demo/demo-2-otel
100110 run : |
101111 echo "Running Demo-2 Core..."
102- podman-compose -f docker-compose.yml build
112+ podman-compose -f docker-compose.yml build --no-cache
103113 podman-compose -f docker-compose.yml up -d
104114
105115 # ===============================
@@ -111,8 +121,8 @@ jobs:
111121 run : |
112122 podman-compose -f docker-compose-persistance.yml up -d
113123
114- # 🔟 Cleanup (Always )
115- - name : Cleanup
124+ # 🔟 FINAL CLEANUP (ALWAYS )
125+ - name : Final cleanup
116126 if : always()
117127 run : |
118128 podman system prune -af --volumes || true
0 commit comments