Some checks failed
Build ostree packages from sid to trixie / Build ostree packages (push) Failing after 35s
- Use docker.io/node:iron-trixie instead of debian:unstable - This provides Node.js support for GitHub Actions while using Debian Trixie base - Should resolve the 'node: executable file not found' error - Better compatibility with actions/checkout@v4 and other Node.js-based actions
187 lines
No EOL
7.4 KiB
YAML
187 lines
No EOL
7.4 KiB
YAML
---
|
|
name: Build ostree packages from sid to trixie
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ostree packages
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: docker.io/node:iron-trixie
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup environment
|
|
run: |
|
|
# Try apt-cacher-ng first, fallback to Debian's automatic mirror selection
|
|
echo "Checking for apt-cacher-ng availability..."
|
|
|
|
# Quick check with timeout to avoid hanging
|
|
if timeout 10 curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
|
|
echo "✅ apt-cacher-ng is available, configuring proxy sources..."
|
|
echo "deb http://192.168.1.101:3142/ftp.debian.org/debian unstable main contrib non-free" > /etc/apt/sources.list
|
|
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list
|
|
else
|
|
echo "⚠️ apt-cacher-ng not available, using standard Debian mirrors..."
|
|
echo "deb http://deb.debian.org/debian unstable main contrib non-free" > /etc/apt/sources.list
|
|
echo "deb-src http://deb.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list
|
|
fi
|
|
|
|
# Update package lists
|
|
echo "Updating package lists..."
|
|
apt update -y
|
|
|
|
# Install build dependencies
|
|
echo "Installing build dependencies..."
|
|
apt-get install -y build-essential fakeroot devscripts debian-keyring equivs
|
|
|
|
- name: Clone ostree from sid
|
|
run: |
|
|
echo "Cloning ostree from Debian sid..."
|
|
cd /tmp
|
|
echo "Current directory before apt source:"
|
|
pwd
|
|
ls -la
|
|
echo "Running apt source ostree..."
|
|
if apt source ostree; then
|
|
echo "apt source ostree succeeded"
|
|
else
|
|
echo "apt source ostree failed!"
|
|
echo "Checking available packages:"
|
|
apt search ostree | head -10
|
|
echo "Checking sources:"
|
|
cat /etc/apt/sources.list
|
|
exit 1
|
|
fi
|
|
echo "After apt source, checking directory:"
|
|
ls -la
|
|
echo "Looking for ostree directory:"
|
|
ls -la ostree-* || echo "No ostree directory found"
|
|
cd ostree-*
|
|
echo "Changed to ostree directory:"
|
|
pwd
|
|
ls -la
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
cd /tmp/ostree-*
|
|
echo "Installing build dependencies..."
|
|
mk-build-deps -i -t 'apt-get -y' debian/control || echo "Build deps installation failed, continuing..."
|
|
apt-get update
|
|
apt-get build-dep -y . || echo "Build deps installation failed, continuing..."
|
|
|
|
# Ensure we have all necessary build tools
|
|
echo "Installing additional build tools..."
|
|
apt-get install -y build-essential fakeroot devscripts || echo "Additional tools installation failed"
|
|
|
|
- name: Check source package structure
|
|
run: |
|
|
cd /tmp/ostree-*
|
|
echo "Checking source package structure..."
|
|
ls -la
|
|
echo "Debian directory contents:"
|
|
ls -la debian/
|
|
echo "Control file:"
|
|
cat debian/control
|
|
echo "Rules file:"
|
|
cat debian/rules
|
|
echo "Changelog:"
|
|
head -20 debian/changelog
|
|
|
|
- name: Add backport revision number
|
|
run: |
|
|
cd /tmp/ostree-*
|
|
echo "Adding backport revision number..."
|
|
dch --bpo || echo "dch --bpo failed, continuing..."
|
|
|
|
- name: Test build
|
|
run: |
|
|
cd /tmp/ostree-*
|
|
echo "Testing build with fakeroot debian/rules binary..."
|
|
if fakeroot debian/rules binary; then
|
|
echo "Test build successful!"
|
|
else
|
|
echo "Test build failed!"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build packages
|
|
run: |
|
|
cd /tmp/ostree-*
|
|
echo "Building ostree packages..."
|
|
echo "Current directory before build:"
|
|
pwd
|
|
ls -la
|
|
|
|
echo "Running dpkg-buildpackage..."
|
|
echo "Build dependencies check:"
|
|
echo "Checking if key dependencies are installed..."
|
|
dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not found"
|
|
dpkg -l | grep libfuse3-dev || echo "libfuse3-dev not found"
|
|
dpkg -l | grep libsystemd-dev || echo "libsystemd-dev not found"
|
|
|
|
echo "Running dpkg-buildpackage with proper Debian backport flags..."
|
|
echo "Using --build=binary --unsigned-changes as per Debian guidelines..."
|
|
if dpkg-buildpackage --build=binary --unsigned-changes; then
|
|
echo "Build successful!"
|
|
else
|
|
echo "Build failed! Checking for any partial packages..."
|
|
ls -la /tmp/*.deb 2>/dev/null || echo "No .deb files found after failed build"
|
|
echo "Checking build logs..."
|
|
ls -la /tmp/ostree-*/ 2>/dev/null || echo "No build directory found"
|
|
echo "Checking for build errors..."
|
|
find /tmp -name "*.log" -exec echo "=== {} ===" \; -exec cat {} \; 2>/dev/null || echo "No log files found"
|
|
echo "Checking debian/rules..."
|
|
cat debian/rules 2>/dev/null || echo "No debian/rules found"
|
|
echo "Checking debian/control..."
|
|
cat debian/control 2>/dev/null || echo "No debian/control found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Build completed! Checking for generated packages..."
|
|
ls -la /tmp/*.deb 2>/dev/null || echo "No .deb files found"
|
|
echo "Copying packages to workspace..."
|
|
cp /tmp/*.deb /workspace/ 2>/dev/null || echo "No .deb files to copy"
|
|
cp /tmp/*.dsc /workspace/ 2>/dev/null || echo "No .dsc files to copy"
|
|
cp /tmp/*.tar.xz /workspace/ 2>/dev/null || echo "No .tar.xz files to copy"
|
|
echo "Workspace contents after copy:"
|
|
ls -la /workspace/
|
|
|
|
- name: Upload to Forgejo Debian Registry
|
|
run: |
|
|
echo "Uploading to Forgejo Debian Registry..."
|
|
echo "Files in current directory:"
|
|
ls -la
|
|
|
|
echo "Looking for .deb files:"
|
|
ls -la *.deb 2>/dev/null || echo "No .deb files found"
|
|
echo "Searching for .deb files in all subdirectories:"
|
|
find . -name "*.deb" -type f
|
|
|
|
# Upload .deb files to Forgejo Debian Registry
|
|
for deb_file in *.deb; do
|
|
if [ -f "$deb_file" ]; then
|
|
echo "Uploading $deb_file to Forgejo Debian Registry..."
|
|
curl --upload-file "$deb_file" \
|
|
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
|
"https://git.raines.xyz/api/packages/particle-os/debian/upload?distro=trixie&component=main&architecture=amd64"
|
|
fi
|
|
done
|
|
|
|
echo "🎯 Debian package publishing complete!"
|
|
echo "📦 Packages are now available in Forgejo Debian Registry"
|
|
echo "🔧 To install: apt install ostree libostree-1-1"
|
|
|
|
- name: Create artifacts
|
|
run: |
|
|
echo "Creating artifacts..."
|
|
mkdir -p /tmp/artifacts
|
|
cp *.deb *.dsc *.tar.xz /tmp/artifacts/ 2>/dev/null || echo "No packages to copy"
|
|
echo "Artifacts created in /tmp/artifacts/"
|
|
ls -la /tmp/artifacts/ |