Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/actions/build-deb/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,10 @@ description: 'Build HALPI2 daemon .deb package'
runs:
using: 'composite'
steps:
- name: Create minimal .env file
run: |
if [ ! -f .env ]; then
echo "# Environment file for GitHub Actions" > .env
fi
shell: bash

- name: Build package
run: ./run docker-build-deb
run: ./run build
shell: bash

- name: Collect built packages
run: |
# Find .deb files created by dpkg-buildpackage (in parent directory)
find . .. -maxdepth 1 -name "*.deb" -exec mv {} ./ \; 2>/dev/null || true
ls -lh *.deb
- name: List built packages
run: ls -lh *.deb
shell: bash
24 changes: 21 additions & 3 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,38 @@ function bumpversion {
# Package Management Commands

function build-deb {
#@ Build Debian package (native, run inside devtools container)
#@ Build Debian package (run inside devtools container)
#@ Category: Package Management
echo "🏗️ Building Debian package..."

# Create a build area with the project as a subdirectory
# This allows dpkg-buildpackage to write to the parent directory
BUILD_AREA=$(mktemp -d)
PROJECT_NAME=$(basename "$PWD")

# Copy source to build area
cp -a . "$BUILD_AREA/$PROJECT_NAME"
cd "$BUILD_AREA/$PROJECT_NAME"

# Build the package
uv sync
dpkg-buildpackage -us -uc -b

# Move artifacts back to original directory
mv "$BUILD_AREA"/*.deb "$BUILD_AREA"/*.buildinfo "$BUILD_AREA"/*.changes "$OLDPWD/" 2>/dev/null || true

# Cleanup
rm -rf "$BUILD_AREA"

echo "✅ Debian package built successfully"
}

function build {
#@ Build Debian package in Docker container
#@ Category: Package Management
echo "🐳 Building Debian package using Docker..."
devtools bash -c "uv sync && dpkg-buildpackage -us -uc -b"
echo "✅ Build complete"
devtools ./run build-deb
echo "✅ Build complete - packages in current directory"
}

function build-docker {
Expand Down