diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 8483b1f..3c83c30 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -71,7 +71,9 @@ jobs: echo "Current directory before Docker run: $(pwd)" echo "Files in current directory before Docker run:" ls -la - docker run --rm -v $(pwd):/workspace bootupd-sdboot:latest bash -c " + + # Run Docker container and capture container ID + CONTAINER_ID=$(docker run -d -v $(pwd):/workspace bootupd-sdboot:latest bash -c " # Setup apt-cacher-ng inside container if available if timeout 5 curl -s --connect-timeout 3 \ http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then @@ -124,28 +126,23 @@ jobs: ls -la /workspace/ && \ echo \"Looking for .deb files in /workspace:\" && \ ls -la /workspace/*.deb 2>/dev/null || echo \"No .deb files found in /workspace\" - " + ") + + # Wait for container to complete + echo "Waiting for container to complete..." + docker wait $CONTAINER_ID + + # Copy .deb file from container to host + echo "Copying .deb file from container to host..." + docker cp $CONTAINER_ID:/workspace/bootupd_0.1.0++_amd64.deb . + + # Clean up container + docker rm $CONTAINER_ID + echo "Current directory after Docker run: $(pwd)" echo "Files in current directory after Docker run:" ls -la - - name: Copy Debian package from Docker container - run: | - cd /tmp/bootupd-sdboot - echo "Copying .deb file from Docker container..." - - # The .deb file should be in the current directory due to Docker mount - # But let's verify and copy it explicitly if needed - if [ -f "bootupd_0.1.0++_amd64.deb" ]; then - echo "✅ .deb file found in current directory" - ls -la bootupd_0.1.0++_amd64.deb - else - echo "❌ .deb file not found in current directory" - echo "Files in current directory:" - ls -la - exit 1 - fi - - name: Upload to Forgejo Debian Registry run: | cd /tmp/bootupd-sdboot