Some checks failed
Build ostree packages from sid to trixie / Build ostree packages (push) Failing after 10s
- Remove Docker-in-Docker complexity that was causing build script issues - Use direct approach on Ubuntu runner with Debian repositories - Follow the same pattern as the working composefs CI - Much simpler and more reliable - no container networking issues - Just add Debian repos to Ubuntu runner and build directly
125 lines
No EOL
4.3 KiB
YAML
125 lines
No EOL
4.3 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
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
run: |
|
|
echo "Cloning repository..."
|
|
git clone https://git.raines.xyz/particle-os/ostree.git /tmp/ostree
|
|
cd /tmp/ostree
|
|
git fetch --all
|
|
git checkout ${{ github.sha || gitea.sha || 'main' }}
|
|
|
|
- name: Setup Debian environment
|
|
run: |
|
|
echo "Setting up Debian environment for building..."
|
|
|
|
# Add Debian repositories
|
|
echo "Adding Debian unstable repositories..."
|
|
echo "deb http://deb.debian.org/debian unstable main" | sudo tee /etc/apt/sources.list.d/debian-unstable.list
|
|
echo "deb-src http://deb.debian.org/debian unstable main" | sudo tee -a /etc/apt/sources.list.d/debian-unstable.list
|
|
|
|
# Add Debian keyring
|
|
sudo apt update
|
|
sudo apt install -y debian-archive-keyring
|
|
|
|
# Update package lists
|
|
sudo apt update -y
|
|
|
|
# Install essential build tools
|
|
sudo apt install -y build-essential fakeroot devscripts curl git
|
|
|
|
- name: Clone ostree from Debian sid
|
|
run: |
|
|
echo "Cloning ostree from Debian sid..."
|
|
cd /tmp
|
|
apt source ostree || { echo "apt source ostree failed!"; exit 1; }
|
|
cd ostree-* || { echo "Failed to change to ostree directory!"; exit 1; }
|
|
echo "Changed to ostree directory:"
|
|
pwd
|
|
ls -la
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
echo "Installing build dependencies..."
|
|
cd /tmp/ostree-*
|
|
sudo mk-build-deps -i -t 'apt-get -y' debian/control || echo "mk-build-deps failed, continuing..."
|
|
sudo apt-get update
|
|
sudo apt-get build-dep -y . || echo "Build deps installation failed, continuing..."
|
|
|
|
- name: Add backport revision number
|
|
run: |
|
|
echo "Adding backport revision number..."
|
|
cd /tmp/ostree-*
|
|
dch --bpo || echo "dch --bpo failed, continuing..."
|
|
|
|
- name: Test build
|
|
run: |
|
|
echo "Testing build with fakeroot debian/rules binary..."
|
|
cd /tmp/ostree-*
|
|
if fakeroot debian/rules binary; then
|
|
echo "Test build successful!"
|
|
else
|
|
echo "Test build failed!"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build packages
|
|
run: |
|
|
echo "Building ostree packages..."
|
|
cd /tmp/ostree-*
|
|
echo "Current directory before build:"
|
|
pwd
|
|
ls -la
|
|
|
|
echo "Running dpkg-buildpackage..."
|
|
if dpkg-buildpackage --build=binary --unsigned-changes; then
|
|
echo "Build successful!"
|
|
else
|
|
echo "Build failed! Checking for any partial packages..."
|
|
ls -la ../*.deb 2>/dev/null || echo "No .deb files found after failed build"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Build completed! Checking for generated packages..."
|
|
ls -la ../*.deb
|
|
echo "Copying packages to workspace..."
|
|
cp ../*.deb /workspace/ 2>/dev/null || echo "No .deb files to copy"
|
|
|
|
- name: Upload to Forgejo Debian Registry
|
|
run: |
|
|
echo "Uploading to Forgejo Debian Registry..."
|
|
cd /tmp/ostree-*
|
|
|
|
echo "Files in current directory:"
|
|
ls -la
|
|
|
|
echo "Looking for .deb files:"
|
|
ls -la ../*.deb 2>/dev/null || echo "No .deb files found"
|
|
|
|
# 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" |