forked from marcosfad/mbp-ubuntu-kernel
-
-
Notifications
You must be signed in to change notification settings - Fork 29
56 lines (53 loc) · 2.56 KB
/
kconfig.yml
File metadata and controls
56 lines (53 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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.12
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/*