Fix CI: Correct package detection for dpkg-deb
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 2m6s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 7s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 52s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped

- Change package detection from ../*.deb to *.deb (current directory)
- dpkg-deb --build creates packages in current directory, not parent
- Update package processing logic to use mv instead of cp
- This should fix the 'No Debian package found' error
This commit is contained in:
robojerk 2025-09-09 22:40:02 -07:00
parent 2008b6fb1b
commit 04908781f5

View file

@ -254,14 +254,14 @@ jobs:
dpkg-deb --build debian/bootc-image-builder "bootc-image-builder_${BUILD_VERSION}_amd64.deb"
fi
# Check if package was created (dpkg-buildpackage puts them in parent directory)
if ls ../*.deb >/dev/null 2>&1; then
# Check if package was created (dpkg-deb puts them in current directory)
if ls *.deb >/dev/null 2>&1; then
echo "✅ Debian package created successfully"
ls -la ../*.deb
ls -la *.deb
# Rename packages with build version to ensure uniqueness
echo "Renaming packages with build version..."
for pkg in ../*.deb; do
for pkg in *.deb; do
pkg_name=$(basename "$pkg")
# Extract current version and replace with build version using sed
@ -270,14 +270,14 @@ jobs:
arch=$(echo "$pkg_name" | sed 's/.*_\([^.]*\)\.deb$/\1/')
new_name="bootc-image-builder_${BUILD_VERSION}_${arch}.deb"
echo "Renaming: $pkg_name -> $new_name"
cp "$pkg" "$new_name"
mv "$pkg" "$new_name"
else
# Fallback: just copy with original name
cp "$pkg" .
# Fallback: keep original name
echo "Keeping original name: $pkg_name"
fi
done
echo "✅ Packages renamed and copied to current directory"
echo "✅ Packages processed successfully"
ls -la *.deb
else
echo "❌ No Debian package found"