Skip to content

Updated workflow with cache fix, kernel version extraction, artifact … #9

Updated workflow with cache fix, kernel version extraction, artifact …

Updated workflow with cache fix, kernel version extraction, artifact … #9

name: Build WLAN Pi Kernel for Debian Bookworm
on:
push:
branches:
- 6.12-bookworm
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
env:
DISTRO: bookworm
VERSION_CODENAME: bookworm
KERNEL_TARGET_DISTRO: Debian
KERNEL_TARGET_VERSION: bookworm
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache APT packages
uses: actions/cache@v3
with:
path: /var/cache/apt/archives # Cache only the writable APT archive directory
key: ${{ runner.os }}-apt-${{ hashFiles('**/build/build-wlanpi-kernel.sh') }}
restore-keys: |
${{ runner.os }}-apt-
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential git libncurses-dev flex bison libssl-dev \
bc libelf-dev libudev-dev libpci-dev libiberty-dev autoconf automake libtool \
libpython3-dev crossbuild-essential-arm64 dpkg-dev gcc-aarch64-linux-gnu
- name: Cache Kernel Build Directory
uses: actions/cache@v3
with:
path: linux
key: ${{ runner.os }}-kernel-${{ hashFiles('**/build/build-wlanpi-kernel.sh') }}
restore-keys: |
${{ runner.os }}-kernel-
- name: Make Build Script Executable
run: chmod +x build/build-wlanpi-kernel.sh
- name: Execute Build Script
id: build-kernel
run: ./build/build-wlanpi-kernel.sh
- name: Extract Kernel Version
id: kernel-version
run: |
echo "KERNEL_VERSION=$(grep -Po 'wlanpi-kernel-\K[^\s]+' output/*.deb)" >> $GITHUB_ENV
- name: Upload Debian Package
uses: actions/upload-artifact@v4
with:
name: wlanpi-kernel-${{ env.KERNEL_VERSION }}-deb-bookworm
path: output/*.deb