Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Build Nekko Kernel

Build Nekko Kernel #26

name: Build Nekko Kernel
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove unused packages
uses: jlumbroso/free-disk-space@main
with:
tool-cache: ture
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Setup build kernel environment & Sync kernel
run: |
cd /home/runner
sudo apt-get update -y
sudo apt-get install -y repo git
git config --global user.email "[email protected]"
git config --global user.name "Github-CI"
mkdir android-kernel && cd android-kernel
repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-redbull-4.19-android14-qpr1
repo sync
cd private/msm-google
git remote add qk https://github.com/QKIvan/android_kernel_google_redbull
git merge qk/Umaru
wget https://raw.githubusercontent.com/xiaoleGun/KernelSU_Action/main/patches/patches.sh
bash patches.sh
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: build-kernel-${{ env.DEVICE }}${{ env.LOCALVERSION }}${{ env.UPLOADNAME }}
max-size: 2G
- name: Build Kernel
run: |
cd /home/runner/android-kernel
./build_redbull.sh
- name: Setting up AnyKenrel3
run: |
cd /home/runner/android-kernel
git clone https://github.com/osm0sis/AnyKernel3.git
sed -i 's/do.devicecheck=1/do.devicecheck=0/g' AnyKernel3/anykernel.sh
sed -i 's!block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;!block=auto;!g' AnyKernel3/anykernel.sh
sed -i 's/is_slot_device=0;/is_slot_device=auto;/g' AnyKernel3/anykernel.sh
cp /home/runner/android-kernel/out/android-msm-pixel-4.19/dist/Image.lz4-dtb AnyKernel3/
cd ./AnyKernel3/
zip -r AnyKernel3 . -x ".git*" -x "README.md" -x "*.zip"
- name: Upload AK3
if: success()
uses: actions/upload-artifact@v4
with:
name: AnyKernel3.zip
path: "/home/runner/android-kernel/AnyKernel3/AnyKernel3.zip"
- name: Upload Image.lz4-dtb
if: success()
uses: actions/upload-artifact@v4
with:
name: Image.lz4-dtb
path: "/home/runner/android-kernel/out/android-msm-pixel-4.19/dist/Image.lz4-dtb"
- name: Generate release tag
id: tag
if: success()
run: |
echo "release_tag=Nekko-$(date +"%Y.%m.%d-%H%M")" >> $GITHUB_OUTPUT
echo "status=success" >> $GITHUB_OUTPUT
- name: Upload kernel and AK3 to Github Release
uses: softprops/action-gh-release@master
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: 'THIS IS A AUTO BUILD FROM GITHUB ACTIONS.THIS BUILD ONLY FOR TEST.BACKUP YOUR DATA BEFORE YOU FLASH IT!!!!!'
tag_name: ${{ steps.tag.outputs.release_tag }}
files: |
/home/runner/android-kernel/out/android-msm-pixel-4.19/dist/Image.lz4-dtb
/home/runner/android-kernel/AnyKernel3/AnyKernel3.zip