Skip to content

Commit 46f6a9e

Browse files
committed
debug: capture Docker build logs in step summary for Void diagnosis
1 parent 3503729 commit 46f6a9e

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,20 @@ jobs:
3333
- uses: actions/checkout@v4
3434

3535
- name: Build Docker image
36-
run: docker build -t lsg-test:${{ matrix.distro }} -f tests/docker/Dockerfile.${{ matrix.distro }} .
36+
run: |
37+
docker build -t lsg-test:${{ matrix.distro }} -f tests/docker/Dockerfile.${{ matrix.distro }} . 2>&1 | tee docker-build.log
38+
echo "BUILD_EXIT_CODE=${PIPESTATUS[0]}" >> $GITHUB_ENV
39+
continue-on-error: true
40+
41+
- name: Check build result
42+
run: |
43+
if [ "$BUILD_EXIT_CODE" != "0" ]; then
44+
echo "## ❌ Docker build failed for ${{ matrix.distro }}" >> $GITHUB_STEP_SUMMARY
45+
echo '```' >> $GITHUB_STEP_SUMMARY
46+
tail -50 docker-build.log >> $GITHUB_STEP_SUMMARY
47+
echo '```' >> $GITHUB_STEP_SUMMARY
48+
exit 1
49+
fi
3750
3851
- name: Run tests
3952
run: python3 tests/runner.py --distro ${{ matrix.distro }}

0 commit comments

Comments
 (0)