diff --git a/.forgejo/workflows/build-packages.yml b/.forgejo/workflows/build-packages.yml index d762952..b9629bd 100644 --- a/.forgejo/workflows/build-packages.yml +++ b/.forgejo/workflows/build-packages.yml @@ -78,6 +78,13 @@ jobs: echo "Built libostree packages:" ls -la /opt/Projects/ostree-backport-noble/*.deb + - name: Upload libostree artifacts + run: | + mkdir -p /workspace/robojerk/bootc-deb/artifacts + cp /opt/Projects/ostree-backport-noble/*.deb /workspace/robojerk/bootc-deb/artifacts/ + echo "Libostree artifacts copied to workspace" + ls -la /workspace/robojerk/bootc-deb/artifacts/ + build-bootc: name: Build bootc Package runs-on: ubuntu-latest @@ -114,6 +121,17 @@ jobs: git clone --depth 1 --branch v${BOOTC_VERSION} https://github.com/containers/bootc.git bootc-${BOOTC_VERSION} cd bootc-${BOOTC_VERSION} + - name: Debug - List files before patching + run: | + cd bootc-${BOOTC_VERSION} + echo "Current directory: $(pwd)" + echo "Files in current directory:" + ls -la + echo "Files in crates/lib/src/ (if it exists):" + ls -la crates/lib/src/ 2>/dev/null || echo "Directory does not exist" + echo "Patch file location:" + ls -la ../bootc-libostree-compatibility.patch + - name: Apply compatibility patch run: | cd bootc-${BOOTC_VERSION} @@ -122,7 +140,19 @@ jobs: echo "This patch is required for bootc to work with the libostree backport." exit 1 fi - patch -p1 < ../bootc-libostree-compatibility.patch + # Try to find the correct path for the file to patch + if [ -f "crates/lib/src/cli.rs" ]; then + echo "Found crates/lib/src/cli.rs, applying patch..." + patch -p1 < ../bootc-libostree-compatibility.patch + elif [ -f "lib/src/cli.rs" ]; then + echo "Found lib/src/cli.rs, applying patch with -p0..." + patch -p0 < ../bootc-libostree-compatibility.patch + else + echo "❌ ERROR: Could not find cli.rs file to patch!" + echo "Available files:" + find . -name "*.rs" | head -20 + exit 1 + fi - name: Copy debian packaging run: | @@ -145,6 +175,13 @@ jobs: echo "Built bootc packages:" ls -la bootc-${BOOTC_VERSION}/../*.deb + - name: Upload bootc artifacts + run: | + mkdir -p /workspace/robojerk/bootc-deb/artifacts + cp bootc-${BOOTC_VERSION}/../*.deb /workspace/robojerk/bootc-deb/artifacts/ + echo "Bootc artifacts copied to workspace" + ls -la /workspace/robojerk/bootc-deb/artifacts/ + create-artifacts: name: Create Combined Artifacts runs-on: ubuntu-latest @@ -176,5 +213,22 @@ jobs: run: | mkdir -p release-assets echo "Creating release assets directory" - echo "Note: In a real setup, this would combine artifacts from previous jobs" - echo "For now, this is a placeholder for the artifact creation process" \ No newline at end of file + + # Copy all artifacts from previous jobs + if [ -d "artifacts" ]; then + cp artifacts/*.deb release-assets/ 2>/dev/null || echo "No .deb files found in artifacts" + fi + + # Create a summary file + echo "Bootc Debian Package Build Summary" > release-assets/BUILD_SUMMARY.txt + echo "=================================" >> release-assets/BUILD_SUMMARY.txt + echo "Build Date: $(date)" >> release-assets/BUILD_SUMMARY.txt + echo "Ubuntu Version: ${UBUNTU_VERSION}" >> release-assets/BUILD_SUMMARY.txt + echo "Ostree Version: ${OSTREE_VERSION}" >> release-assets/BUILD_SUMMARY.txt + echo "Bootc Version: ${BOOTC_VERSION}" >> release-assets/BUILD_SUMMARY.txt + echo "" >> release-assets/BUILD_SUMMARY.txt + echo "Built Packages:" >> release-assets/BUILD_SUMMARY.txt + ls -la release-assets/*.deb 2>/dev/null || echo "No packages found" >> release-assets/BUILD_SUMMARY.txt + + echo "Release assets created:" + ls -la release-assets/ \ No newline at end of file