Restructure CI to run directly on Forgejo runner without redundant Docker layer
Some checks failed
Build ostree packages from sid to trixie / Build ostree packages (push) Failing after 5s
Some checks failed
Build ostree packages from sid to trixie / Build ostree packages (push) Failing after 5s
- Remove custom Dockerfile as it's redundant with Forgejo runner containerization - Use debian:unstable-slim container directly like apt-ostree CI - Run all build steps directly on the runner for better visibility - Follow Debian SimpleBackportCreation guidelines for proper backporting - This should provide much better logging and debugging visibility - Based on apt-ostree CI workflow as reference
This commit is contained in:
parent
4f3d9cb521
commit
378827971c
2 changed files with 139 additions and 357 deletions
|
|
@ -4,340 +4,184 @@ name: Build ostree packages from sid to trixie
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
workflow_dispatch:
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
MESON_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build ostree packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
container:
|
||||||
contents: read
|
image: debian:unstable-slim
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup environment
|
||||||
run: |
|
run: |
|
||||||
echo "Cloning repository..."
|
# Try apt-cacher-ng first, fallback to Debian's automatic mirror selection
|
||||||
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 apt-cacher-ng
|
|
||||||
run: |
|
|
||||||
echo "Setting up apt-cacher-ng for faster builds..."
|
|
||||||
|
|
||||||
# Try apt-cacher-ng first, fallback to standard mirrors
|
|
||||||
echo "Checking for apt-cacher-ng availability..."
|
echo "Checking for apt-cacher-ng availability..."
|
||||||
|
|
||||||
# Quick check with timeout to avoid hanging
|
# Quick check with timeout to avoid hanging
|
||||||
if timeout 10 curl -s --connect-timeout 5 \
|
if timeout 10 curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
|
||||||
http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
|
echo "✅ apt-cacher-ng is available, configuring proxy sources..."
|
||||||
echo "✅ apt-cacher-ng is available, configuring Docker proxy..."
|
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
|
||||||
# Create Docker daemon configuration for apt-cacher-ng
|
|
||||||
sudo mkdir -p /etc/docker
|
|
||||||
echo '{
|
|
||||||
"proxies": {
|
|
||||||
"default": {
|
|
||||||
"httpProxy": "http://192.168.1.101:3142",
|
|
||||||
"httpsProxy": "http://192.168.1.101:3142",
|
|
||||||
"noProxy": "localhost,127.0.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}' | sudo tee /etc/docker/daemon.json
|
|
||||||
|
|
||||||
echo "Docker proxy configuration created"
|
|
||||||
else
|
else
|
||||||
echo "⚠️ apt-cacher-ng not available, using standard mirrors..."
|
echo "⚠️ apt-cacher-ng not available, using standard Debian mirrors..."
|
||||||
echo "Using standard Debian mirrors for Docker builds"
|
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
|
fi
|
||||||
|
|
||||||
- name: Build Docker image
|
# Update package lists
|
||||||
run: |
|
echo "Updating package lists..."
|
||||||
cd /tmp/ostree
|
apt update -y
|
||||||
docker build --build-arg release_name=unstable -f Dockerfile \
|
|
||||||
-t ostree-build:latest .
|
|
||||||
|
|
||||||
- name: Build ostree packages inside container
|
# Install build dependencies
|
||||||
|
echo "Installing build dependencies..."
|
||||||
|
apt-get install -y build-essential fakeroot devscripts debian-keyring equivs
|
||||||
|
|
||||||
|
- name: Clone ostree from sid
|
||||||
run: |
|
run: |
|
||||||
cd /tmp/ostree
|
echo "Cloning ostree from Debian sid..."
|
||||||
echo "Current directory before Docker run: $(pwd)"
|
cd /tmp
|
||||||
echo "Files in current directory before Docker run:"
|
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
|
ls -la
|
||||||
|
|
||||||
# Run Docker container and capture container ID
|
- name: Install build dependencies
|
||||||
CONTAINER_ID=$(docker run -d -v $(pwd):/workspace ostree-build:latest bash -c "
|
run: |
|
||||||
# Setup apt-cacher-ng inside container if available
|
cd /tmp/ostree-*
|
||||||
if timeout 5 curl -s --connect-timeout 3 \
|
echo "Installing build dependencies..."
|
||||||
http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
|
mk-build-deps -i -t 'apt-get -y' debian/control || echo "Build deps installation failed, continuing..."
|
||||||
echo '✅ Using apt-cacher-ng for package downloads...'
|
apt-get update
|
||||||
echo 'deb http://192.168.1.101:3142/ftp.us.debian.org/debian unstable main' > /etc/apt/sources.list
|
apt-get build-dep -y . || echo "Build deps installation failed, continuing..."
|
||||||
echo 'deb-src http://192.168.1.101:3142/ftp.us.debian.org/debian unstable main' >> /etc/apt/sources.list
|
|
||||||
else
|
|
||||||
echo '⚠️ Using standard Debian mirrors...'
|
|
||||||
echo 'deb http://deb.debian.org/debian unstable main' > /etc/apt/sources.list
|
|
||||||
echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update package lists
|
|
||||||
apt update -y
|
|
||||||
|
|
||||||
# Install build dependencies
|
|
||||||
apt install -y build-essential devscripts debhelper pkg-config \
|
|
||||||
libglib2.0-dev libgpgme11-dev libfuse3-dev libsoup2.4-dev \
|
|
||||||
libarchive-dev libcurl4-openssl-dev libsystemd-dev \
|
|
||||||
libcap-dev libselinux1-dev libavahi-client-dev \
|
|
||||||
libavahi-glib-dev libgirepository1.0-dev gtk-doc-tools \
|
|
||||||
gobject-introspection libgjs-dev valac
|
|
||||||
|
|
||||||
# Clone ostree from sid
|
|
||||||
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
|
|
||||||
|
|
||||||
# Update changelog for trixie
|
|
||||||
echo 'Updating changelog for trixie...'
|
|
||||||
dch --local '+trixie' --distribution trixie 'Backport from sid to trixie'
|
|
||||||
|
|
||||||
# Install build dependencies
|
|
||||||
echo 'Installing build dependencies...'
|
|
||||||
apt-get update
|
|
||||||
apt-get build-dep -y . || echo 'Build deps installation failed, continuing...'
|
|
||||||
mk-build-deps -i -t 'apt-get -y' debian/control || 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'
|
|
||||||
|
|
||||||
# Check source package structure
|
|
||||||
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
|
|
||||||
|
|
||||||
# Add backport revision number (following Debian guidelines)
|
|
||||||
echo 'Adding backport revision number...'
|
|
||||||
dch --bpo || echo 'dch --bpo failed, continuing...'
|
|
||||||
|
|
||||||
# Test build first (following Debian guidelines)
|
|
||||||
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
|
|
||||||
|
|
||||||
# Build packages properly (following Debian guidelines)
|
|
||||||
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 built packages in /tmp:'
|
|
||||||
ls -la /tmp/*.deb 2>/dev/null || echo 'No .deb files found in /tmp'
|
|
||||||
ls -la /tmp/*.dsc 2>/dev/null || echo 'No .dsc files found in /tmp'
|
|
||||||
ls -la /tmp/*.tar.xz 2>/dev/null || echo 'No .tar.xz files found in /tmp'
|
|
||||||
|
|
||||||
# Check if we're in the right directory for the build
|
|
||||||
echo 'Current working directory:'
|
|
||||||
pwd
|
|
||||||
echo 'Files in current directory:'
|
|
||||||
ls -la
|
|
||||||
echo 'Looking for .deb files in current directory:'
|
|
||||||
ls -la *.deb 2>/dev/null || echo 'No .deb files in current directory'
|
|
||||||
|
|
||||||
# Copy built packages to workspace
|
|
||||||
echo 'Copying built packages to workspace...'
|
|
||||||
cp /tmp/*.deb /workspace/ 2>/dev/null || true
|
|
||||||
cp /tmp/*.dsc /workspace/ 2>/dev/null || true
|
|
||||||
cp /tmp/*.tar.xz /workspace/ 2>/dev/null || true
|
|
||||||
|
|
||||||
# Also copy from current directory (where dpkg-buildpackage might have put them)
|
|
||||||
cp *.deb /workspace/ 2>/dev/null || true
|
|
||||||
cp *.dsc /workspace/ 2>/dev/null || true
|
|
||||||
cp *.tar.xz /workspace/ 2>/dev/null || true
|
|
||||||
|
|
||||||
echo 'Built packages in /workspace:'
|
|
||||||
ls -la /workspace/*.deb 2>/dev/null || echo 'No .deb files found in /workspace'
|
|
||||||
|
|
||||||
echo 'All files in /workspace:'
|
|
||||||
ls -la /workspace/
|
|
||||||
|
|
||||||
echo 'All files in /tmp:'
|
|
||||||
ls -la /tmp/*.deb 2>/dev/null || echo 'No .deb files found in /tmp'
|
|
||||||
")
|
|
||||||
|
|
||||||
# Wait for container to complete
|
# Ensure we have all necessary build tools
|
||||||
echo "Waiting for container to complete..."
|
echo "Installing additional build tools..."
|
||||||
docker wait $CONTAINER_ID
|
apt-get install -y build-essential fakeroot devscripts || echo "Additional tools installation failed"
|
||||||
|
|
||||||
# Copy .deb files from container to host
|
- name: Check source package structure
|
||||||
echo "Copying .deb files from container to host..."
|
run: |
|
||||||
echo "Contents of container /workspace before copy:"
|
cd /tmp/ostree-*
|
||||||
docker exec $CONTAINER_ID ls -la /workspace/ 2>/dev/null || echo "Cannot exec into container"
|
echo "Checking source package structure..."
|
||||||
|
ls -la
|
||||||
docker cp $CONTAINER_ID:/workspace/. .
|
echo "Debian directory contents:"
|
||||||
|
ls -la debian/
|
||||||
echo "Contents of host directory after copy:"
|
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
|
ls -la
|
||||||
|
|
||||||
# Also check if files are in the workspace subdirectory
|
echo "Running dpkg-buildpackage..."
|
||||||
if [ -d "workspace" ]; then
|
echo "Build dependencies check:"
|
||||||
echo "Found workspace directory, copying files from there..."
|
echo "Checking if key dependencies are installed..."
|
||||||
echo "Contents of workspace directory:"
|
dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not found"
|
||||||
ls -la workspace/
|
dpkg -l | grep libfuse3-dev || echo "libfuse3-dev not found"
|
||||||
cp workspace/*.deb . 2>/dev/null || true
|
dpkg -l | grep libsystemd-dev || echo "libsystemd-dev not found"
|
||||||
cp workspace/*.dsc . 2>/dev/null || true
|
|
||||||
cp workspace/*.tar.xz . 2>/dev/null || true
|
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
|
fi
|
||||||
|
|
||||||
# Clean up container
|
echo "Build completed! Checking for generated packages..."
|
||||||
docker rm $CONTAINER_ID
|
ls -la /tmp/*.deb 2>/dev/null || echo "No .deb files found"
|
||||||
|
echo "Copying packages to workspace..."
|
||||||
echo "Current directory after Docker run: $(pwd)"
|
cp /tmp/*.deb /workspace/ 2>/dev/null || echo "No .deb files to copy"
|
||||||
echo "Files in current directory after Docker run:"
|
cp /tmp/*.dsc /workspace/ 2>/dev/null || echo "No .dsc files to copy"
|
||||||
ls -la
|
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
|
- name: Upload to Forgejo Debian Registry
|
||||||
run: |
|
run: |
|
||||||
cd /tmp/ostree
|
|
||||||
echo "Uploading to Forgejo Debian Registry..."
|
echo "Uploading to Forgejo Debian Registry..."
|
||||||
|
|
||||||
# Debug: List files in current directory
|
|
||||||
echo "Files in current directory:"
|
echo "Files in current directory:"
|
||||||
ls -la
|
ls -la
|
||||||
|
|
||||||
echo "Looking for .deb files:"
|
echo "Looking for .deb files:"
|
||||||
ls -la *.deb 2>/dev/null || echo "No .deb files found"
|
ls -la *.deb 2>/dev/null || echo "No .deb files found"
|
||||||
echo "Searching for .deb files in all subdirectories:"
|
echo "Searching for .deb files in all subdirectories:"
|
||||||
find . -name "*.deb" -type f
|
find . -name "*.deb" -type f
|
||||||
|
|
||||||
# Set Forgejo configuration
|
# Upload .deb files to Forgejo Debian Registry
|
||||||
FORGEJO_OWNER="particle-os"
|
for deb_file in *.deb; do
|
||||||
FORGEJO_DISTRIBUTION="trixie"
|
if [ -f "$deb_file" ]; then
|
||||||
FORGEJO_COMPONENT="main"
|
echo "Uploading $deb_file to Forgejo Debian Registry..."
|
||||||
|
curl --upload-file "$deb_file" \
|
||||||
# Upload each .deb file
|
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
||||||
for DEB_FILE in *.deb; do
|
"https://git.raines.xyz/api/packages/particle-os/debian/upload?distro=trixie&component=main&architecture=amd64"
|
||||||
if [ -f "$DEB_FILE" ]; then
|
|
||||||
echo "📦 Uploading package: $DEB_FILE"
|
|
||||||
|
|
||||||
# Extract package info
|
|
||||||
PKG_NAME=$(dpkg-deb -f "$DEB_FILE" Package 2>/dev/null || echo "unknown")
|
|
||||||
PKG_VERSION=$(dpkg-deb -f "$DEB_FILE" Version 2>/dev/null || echo "unknown")
|
|
||||||
PKG_ARCH=$(dpkg-deb -f "$DEB_FILE" Architecture 2>/dev/null || echo "amd64")
|
|
||||||
|
|
||||||
echo " Package: $PKG_NAME"
|
|
||||||
echo " Version: $PKG_VERSION"
|
|
||||||
echo " Architecture: $PKG_ARCH"
|
|
||||||
|
|
||||||
# Forgejo Debian Registry upload URL
|
|
||||||
UPLOAD_URL="https://git.raines.xyz/api/packages/${FORGEJO_OWNER}/debian/pool/${FORGEJO_DISTRIBUTION}/${FORGEJO_COMPONENT}/upload"
|
|
||||||
|
|
||||||
echo " Upload URL: $UPLOAD_URL"
|
|
||||||
|
|
||||||
# Upload to Forgejo Debian Registry
|
|
||||||
if [ -n "${{ secrets.ACCESS_TOKEN }}" ]; then
|
|
||||||
echo " 🔐 Using authentication token..."
|
|
||||||
UPLOAD_RESULT=$(curl -s -w "%{http_code}" \
|
|
||||||
--user "${FORGEJO_OWNER}:${{ secrets.ACCESS_TOKEN }}" \
|
|
||||||
--upload-file "$DEB_FILE" \
|
|
||||||
"$UPLOAD_URL" 2>/dev/null)
|
|
||||||
|
|
||||||
# Extract HTTP status code (last 3 characters)
|
|
||||||
HTTP_CODE=$(echo "$UPLOAD_RESULT" | tail -c 4)
|
|
||||||
# Extract response body (everything except last 3 characters)
|
|
||||||
RESPONSE_BODY=$(echo "$UPLOAD_RESULT" | head -c -4)
|
|
||||||
|
|
||||||
case $HTTP_CODE in
|
|
||||||
201)
|
|
||||||
echo " ✅ Successfully published $PKG_NAME to Forgejo Debian Registry!"
|
|
||||||
;;
|
|
||||||
409)
|
|
||||||
echo " ⚠️ Package $PKG_NAME already exists (version conflict)"
|
|
||||||
;;
|
|
||||||
400)
|
|
||||||
echo " ❌ Bad request - package $PKG_NAME validation failed"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo " ❌ Upload failed for $PKG_NAME with HTTP $HTTP_CODE"
|
|
||||||
echo " Response: $RESPONSE_BODY"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
echo " ⚠️ No ACCESS_TOKEN secret available - skipping upload for $PKG_NAME"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "🎯 Debian package publishing complete!"
|
echo "🎯 Debian package publishing complete!"
|
||||||
echo "📦 Packages are now available in Forgejo Debian Registry"
|
echo "📦 Packages are now available in Forgejo Debian Registry"
|
||||||
echo "🔧 To install: apt install ostree libostree-1-1"
|
echo "🔧 To install: apt install ostree libostree-1-1"
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Create artifacts
|
||||||
run: |
|
run: |
|
||||||
cd /tmp/ostree
|
echo "Creating artifacts..."
|
||||||
echo "Creating artifact directory..."
|
|
||||||
mkdir -p /tmp/artifacts
|
mkdir -p /tmp/artifacts
|
||||||
cp *.deb /tmp/artifacts/ 2>/dev/null || true
|
cp *.deb *.dsc *.tar.xz /tmp/artifacts/ 2>/dev/null || echo "No packages to copy"
|
||||||
cp *.dsc /tmp/artifacts/ 2>/dev/null || true
|
|
||||||
cp *.tar.xz /tmp/artifacts/ 2>/dev/null || true
|
|
||||||
echo "Artifacts created in /tmp/artifacts/"
|
echo "Artifacts created in /tmp/artifacts/"
|
||||||
ls -la /tmp/artifacts/
|
ls -la /tmp/artifacts/
|
||||||
62
Dockerfile
62
Dockerfile
|
|
@ -1,62 +0,0 @@
|
||||||
FROM debian:unstable-slim
|
|
||||||
|
|
||||||
# Set environment variables
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
ENV LANG=C.UTF-8
|
|
||||||
ENV LC_ALL=C.UTF-8
|
|
||||||
|
|
||||||
# Add source repositories
|
|
||||||
RUN echo "Types: deb deb-src" > /etc/apt/sources.list.d/debian.sources && \
|
|
||||||
echo "URIs: http://deb.debian.org/debian" >> /etc/apt/sources.list.d/debian.sources && \
|
|
||||||
echo "Suites: unstable" >> /etc/apt/sources.list.d/debian.sources && \
|
|
||||||
echo "Components: main" >> /etc/apt/sources.list.d/debian.sources && \
|
|
||||||
echo "Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources
|
|
||||||
|
|
||||||
# Install build dependencies for OSTree
|
|
||||||
RUN apt update && \
|
|
||||||
apt install -y \
|
|
||||||
build-essential \
|
|
||||||
devscripts \
|
|
||||||
debhelper \
|
|
||||||
dh-autoreconf \
|
|
||||||
pkg-config \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
cmake \
|
|
||||||
ninja-build \
|
|
||||||
meson \
|
|
||||||
autotools-dev \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
libtool \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libgpgme-dev \
|
|
||||||
libfuse3-dev \
|
|
||||||
libsoup2.4-dev \
|
|
||||||
libarchive-dev \
|
|
||||||
libcurl4-openssl-dev \
|
|
||||||
libsystemd-dev \
|
|
||||||
libcap-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
libzstd-dev \
|
|
||||||
libbz2-dev \
|
|
||||||
liblz4-dev \
|
|
||||||
libz-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libyaml-dev \
|
|
||||||
libjson-c-dev \
|
|
||||||
libavahi-client-dev \
|
|
||||||
libavahi-common-dev \
|
|
||||||
libavahi-glib-dev \
|
|
||||||
libavahi-gobject-dev \
|
|
||||||
&& \
|
|
||||||
apt clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /workspace
|
|
||||||
|
|
||||||
# Default command
|
|
||||||
CMD ["bash"]
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue