secubox-openwrt/package/secubox/luci-app-secubox/.github/workflows/build.yml
CyberMind-FR 675b2d164e feat: Portal service detection, nDPId compat layer, CrowdSec/Netifyd packages
Portal (luci-app-secubox-portal):
- Fix service status showing 0/9 by checking if init scripts exist
- Only count installed services in status display
- Use pgrep fallback when init script status fails

nDPId Dashboard (luci-app-ndpid):
- Add default /etc/config/ndpid configuration
- Add /etc/init.d/ndpid-compat init script
- Enable compat service in postinst for app detection
- Fix Makefile to install init script and config

CrowdSec Dashboard:
- Add CLAUDE.md with OpenWrt-specific guidelines (pgrep without -x)
- CSS fixes for hiding LuCI left menu in all views
- LAPI repair improvements with retry logic

New Packages:
- secubox-app-crowdsec: OpenWrt-native CrowdSec package
- secubox-app-netifyd: Netifyd DPI integration
- luci-app-secubox: Core SecuBox hub
- luci-theme-secubox: Custom theme

Removed:
- luci-app-secubox-crowdsec (replaced by crowdsec-dashboard)
- secubox-crowdsec-setup (functionality moved to dashboard)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:51:40 +01:00

123 lines
3.9 KiB
YAML

name: Build OpenWrt LuCI Package
on:
push:
branches: [ main, master ]
tags: [ 'v*' ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
env:
PKG_NAME: luci-app-secubox
OPENWRT_VERSION: '23.05.5'
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check structure
run: |
test -f Makefile
grep -q "PKG_NAME:=luci-app-secubox" Makefile
find . -name "*.json" -exec python3 -m json.tool {} \; >/dev/null
build:
name: Build ${{ matrix.arch }}
needs: validate
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
target: x86
subtarget: 64
- arch: aarch64_cortex-a53
target: mvebu
subtarget: cortexa53
- arch: aarch64_cortex-a72
target: mvebu
subtarget: cortexa72
- arch: arm_cortex-a9_vfpv3-d16
target: mvebu
subtarget: cortexa9
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: |
sudo apt-get update
sudo apt-get install -y build-essential clang flex bison g++ gawk \
gcc-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync unzip zlib1g-dev file wget xsltproc
- name: Download and extract SDK
run: |
SDK_BASE="https://downloads.openwrt.org/releases/${{ env.OPENWRT_VERSION }}/targets/${{ matrix.target }}/${{ matrix.subtarget }}"
wget -q "${SDK_BASE}/sha256sums"
SDK_FILE=$(grep -E "openwrt-sdk.*\.tar\.(xz|zst)" sha256sums | head -1 | awk '{print $NF}' | tr -d '*')
[ -z "$SDK_FILE" ] && { echo "SDK not found"; exit 1; }
wget -q "${SDK_BASE}/${SDK_FILE}"
case "$SDK_FILE" in
*.tar.xz) tar -xJf "$SDK_FILE" ;;
*.tar.zst) tar --zstd -xf "$SDK_FILE" ;;
esac
SDK_DIR=$(find . -maxdepth 1 -type d -name "openwrt-sdk-*" -print -quit)
mv "$SDK_DIR" sdk
- name: Build package
run: |
cd sdk
grep -q "^src-git luci" feeds.conf.default || \
echo "src-git luci https://github.com/openwrt/luci.git;openwrt-23.05" >> feeds.conf.default
# Création explicite de feeds.conf avec miroirs GitHub
cat > feeds.conf << 'EOF'
src-git base https://github.com/openwrt/openwrt.git;openwrt-23.05
src-git packages https://github.com/openwrt/packages.git;openwrt-23.05
src-git luci https://github.com/openwrt/luci.git;openwrt-23.05
src-git routing https://github.com/openwrt/routing.git;openwrt-23.05
EOF
# Retry logic
for attempt in 1 2 3; do
./scripts/feeds update -a && break
sleep $((30 * attempt))
done
./scripts/feeds install -a
mkdir -p "package/${{ env.PKG_NAME }}"
rsync -av --exclude='.git' --exclude='sdk' --exclude='*.tar.*' ../. "package/${{ env.PKG_NAME }}/"
make defconfig
make "package/${{ env.PKG_NAME }}/compile" V=s -j$(nproc) || \
make "package/${{ env.PKG_NAME }}/compile" V=s -j1
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}-${{ matrix.arch }}
path: sdk/bin/**/*.ipk
if-no-files-found: error
release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*.ipk
generate_release_notes: true