Skip to content

Commit cf93e94

Browse files
committed
test3
1 parent 7d071ae commit cf93e94

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

.github/workflows/main.yaml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,27 @@ jobs:
6262
podman-compose --version
6363
6464
# --------------------------------------------------
65-
# Configure Podman storage (CI-safe)
65+
# 🔴 CRITICAL FIX #1: Podman storage + TMPDIR
6666
# --------------------------------------------------
67-
- name: Configure Podman storage
67+
- name: Configure Podman storage and temp dirs
6868
run: |
69-
STORAGE_ROOT="/home/runner/work/_containers"
70-
sudo mkdir -p "$STORAGE_ROOT" /etc/containers
69+
STORAGE_ROOT="/home/runner/work/podman-storage"
70+
TMP_ROOT="/home/runner/work/podman-tmp"
71+
72+
sudo mkdir -p "$STORAGE_ROOT" "$TMP_ROOT" /etc/containers
7173
7274
echo "[storage]" | sudo tee /etc/containers/storage.conf
73-
echo "graphroot=\"$STORAGE_ROOT\"" | sudo tee -a /etc/containers/storage.conf
75+
echo "driver = \"overlay\"" | sudo tee -a /etc/containers/storage.conf
76+
echo "graphroot = \"$STORAGE_ROOT\"" | sudo tee -a /etc/containers/storage.conf
77+
echo "runroot = \"$TMP_ROOT\"" | sudo tee -a /etc/containers/storage.conf
78+
79+
echo "TMPDIR=$TMP_ROOT" >> $GITHUB_ENV
80+
echo "XDG_RUNTIME_DIR=$TMP_ROOT" >> $GITHUB_ENV
7481
7582
podman system migrate || true
7683
7784
# --------------------------------------------------
78-
# Hard cleanup (before build)
85+
# Cleanup before builds
7986
# --------------------------------------------------
8087
- name: Pre-build Cleanup
8188
run: |
@@ -87,7 +94,7 @@ jobs:
8794
podman system prune -a -f
8895
8996
# --------------------------------------------------
90-
# Create external networks (required!)
97+
# Create external networks
9198
# --------------------------------------------------
9299
- name: Create Podman networks
93100
run: |
@@ -100,36 +107,37 @@ jobs:
100107
- name: Build & Run demo-1-basics
101108
working-directory: demo/demo-1-basics
102109
run: |
103-
echo "Building and running demo-1-basics..."
110+
echo "Running demo-1-basics..."
104111
105-
podman-compose -f docker-compose.yaml build --no-cache
112+
podman-compose -f docker-compose.yaml build
106113
podman-compose -f docker-compose.yaml up -d
107114
108-
echo "Containers:"
109115
podman ps -a
110-
111116
podman-compose -f docker-compose.yaml logs || true
112117
113-
echo "Cleaning up demo-1-basics..."
114118
podman-compose -f docker-compose.yaml down -v
115119
120+
# --------------------------------------------------
121+
# 🔴 CRITICAL FIX #3: prune between demos
122+
# --------------------------------------------------
123+
- name: Cleanup after demo-1-basics
124+
run: |
125+
podman system prune -a -f
126+
116127
# --------------------------------------------------
117128
# demo-2-otel
118129
# --------------------------------------------------
119130
- name: Build & Run demo-2-otel
120131
working-directory: demo/demo-2-otel
121132
run: |
122-
echo "Building and running demo-2-otel..."
133+
echo "Running demo-2-otel..."
123134
124-
podman-compose -f docker-compose.yaml build --no-cache
135+
podman-compose -f docker-compose.yaml build
125136
podman-compose -f docker-compose.yaml up -d
126137
127-
echo "Containers:"
128138
podman ps -a
129-
130139
podman-compose -f docker-compose.yaml logs || true
131140
132-
echo "Cleaning up demo-2-otel..."
133141
podman-compose -f docker-compose.yaml down -v
134142
135143
# --------------------------------------------------
@@ -138,5 +146,4 @@ jobs:
138146
- name: Final Cleanup
139147
if: always()
140148
run: |
141-
echo "Final Podman system cleanup..."
142149
podman system prune -a -f

0 commit comments

Comments
 (0)