name: Get Kernel config on: workflow_dispatch: jobs: Get-config: runs-on: ubuntu-latest steps: - name: 'Checkout Repo' uses: actions/checkout@v6 - name: Get kconfig run: | mkdir /tmp/artifacts sudo apt update wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh chmod +x ubuntu-mainline-kernel.sh sudo mv ubuntu-mainline-kernel.sh /usr/local/bin/ latestupstream=$(curl -sL https://kernel.org/ | grep "latest_button" -A 1 | awk "NR==2" | cut -d "/" -f 8 | cut -d "\"" -f 1 | cut -d "-" -f 2 | rev | cut -c 8- | rev) sudo ubuntu-mainline-kernel.sh -i --yes || (sub=$(echo ${latestupstream} | cut -d "." -f 3) && main=$(echo ${latestupstream} | cut -d "." -f 1,2) && newsub=$((${sub} - 1)) && newlatest=${main}.${newsub} && sudo sed -i "s/version=.*/version=v${newlatest}/g" /usr/local/bin/ubuntu-mainline-kernel.sh && sudo ubuntu-mainline-kernel.sh -i --yes) || echo "Failed" LTS_VER=6.18 latestupstream=$(curl -sL https://kernel.org/ | grep -Eo "linux-${LTS_VER}(\.[0-9]+)?\.tar\.xz" | sort -V | tail -n1 | sed -E 's/linux-|\.tar\.xz//g') sudo sed -i "s/version=.*/version=v${latestupstream}/g" /usr/local/bin/ubuntu-mainline-kernel.sh sudo ubuntu-mainline-kernel.sh -i --yes || (sub=$(echo ${latestupstream} | cut -d "." -f 3) && main=$(echo ${latestupstream} | cut -d "." -f 1,2) && newsub=$((${sub} - 1)) && newlatest=${main}.${newsub} && sudo sed -i "s/version=.*/version=v${newlatest}/g" /usr/local/bin/ubuntu-mainline-kernel.sh && sudo ubuntu-mainline-kernel.sh -i --yes) || echo "Failed" DOCKER_IMAGE=debian:unstable docker pull ${DOCKER_IMAGE} docker run \ -t \ -v "$(pwd)":/repo \ -e DEBIAN_FRONTEND=noninteractive \ ${DOCKER_IMAGE} \ /bin/bash -c 'echo "deb http://ftp.debian.org/debian/ experimental main non-free non-free-firmware contrib" >> /etc/apt/sources.list.d/experimental.list && \ apt-get update && \ apt-get install -t experimental -y linux-image-amd64 && \ mkdir /repo/configs cp -r /boot/config* /repo/configs' cp -r "$(pwd)"/configs/* /tmp/artifacts cp -r /boot/config* /tmp/artifacts - name: Upload package artifact uses: actions/upload-artifact@v7 with: name: kconfig path: /tmp/artifacts/*