Build Kernels #744
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Kernels | |
| permissions: | |
| contents: write | |
| actions: write | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: "Release Type" | |
| type: choice | |
| options: [ Actions, Pre-Release, Release ] | |
| default: Actions | |
| ksu_variant: | |
| description: "KernelSU Variant" | |
| type: choice | |
| options: [ KSU, WKSU, Next, RKSU] | |
| default: Next | |
| ksu_commit: | |
| description: "KSU Commit (optional)" | |
| type: string | |
| required: false | |
| # Build Selection | |
| build_a12_5_10: | |
| description: "Android 12 - 5.10" | |
| type: boolean | |
| default: false | |
| build_a13_5_10: | |
| description: "Android 13 - 5.10" | |
| type: boolean | |
| default: false | |
| build_a13_5_15: | |
| description: "Android 13 - 5.15" | |
| type: boolean | |
| default: false | |
| build_a14_5_15: | |
| description: "Android 14 - 5.15" | |
| type: boolean | |
| default: false | |
| build_a14_6_1: | |
| description: "Android 14 - 6.1" | |
| type: boolean | |
| default: false | |
| build_a15_6_6: | |
| description: "Android 15 - 6.6" | |
| type: boolean | |
| default: false | |
| build_a16_6_12: | |
| description: "Android 16 - 6.12" | |
| type: boolean | |
| default: false | |
| build_custom: | |
| description: "Custom Builds" | |
| type: boolean | |
| default: true | |
| jobs: | |
| build-a12-5-10: | |
| if: inputs.build_a12_5_10 | |
| uses: ./.github/workflows/kernel-a12-5-10.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-a13-5-10: | |
| if: inputs.build_a13_5_10 | |
| uses: ./.github/workflows/kernel-a13-5-10.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-a13-5-15: | |
| if: inputs.build_a13_5_15 | |
| uses: ./.github/workflows/kernel-a13-5-15.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-a14-5-15: | |
| if: inputs.build_a14_5_15 | |
| uses: ./.github/workflows/kernel-a14-5-15.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-a14-6-1: | |
| if: inputs.build_a14_6_1 | |
| uses: ./.github/workflows/kernel-a14-6-1.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-a15-6-6: | |
| if: inputs.build_a15_6_6 | |
| uses: ./.github/workflows/kernel-a15-6-6.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-a16-6-12: | |
| if: inputs.build_a16_6_12 | |
| uses: ./.github/workflows/kernel-a16-612.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| build-custom: | |
| if: inputs.build_custom | |
| uses: ./.github/workflows/kernel-custom.yml | |
| secrets: inherit | |
| with: | |
| ksu_variant: ${{ inputs.ksu_variant }} | |
| ksu_commit: ${{ inputs.ksu_commit }} | |
| release: | |
| runs-on: ubuntu-latest | |
| if: inputs.release_type != 'Actions' | |
| needs: | |
| - build-a12-5-10 | |
| - build-a13-5-10 | |
| - build-a13-5-15 | |
| - build-a14-5-15 | |
| - build-a14-6-1 | |
| - build-a15-6-6 | |
| - build-a16-6-12 | |
| - build-custom | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| RELEASE_NAME: "GKI Kernels With KernelSU-Next & SUSFS v2.0.0" | |
| RELEASE_BODY: "" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Generate New Tag | |
| if: inputs.release_type != 'Actions' | |
| run: | | |
| LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name' 2>/dev/null || echo "") | |
| NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}') | |
| echo "New tag: $NEW_TAG" | |
| echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV | |
| - name: Set release body | |
| run: | | |
| cat << 'EOF' > release_body.md | |
| **IMPORTANT DISCLAIMER** | |
| This software is provided for testing and educational purposes only. Use at your own risk. | |
| The developers are not responsible for any damage, data loss, or issues that may occur. | |
| Please ensure you have proper backups before installation. | |
| 🔹 Normal | |
| - Default kernel configuration | |
| - Standard kernel module loading behavior | |
| - Recommended for most users | |
| 🔹 Bypass | |
| - Includes module check bypass modifications | |
| - What are kernel modules? Kernel modules are pieces of code that can be loaded into the kernel at runtime to extend functionality (like device drivers, filesystem support, etc.). These are different from KernelSU/Magisk modules. | |
| - The Problem: Sometimes when installing a custom kernel, the device tries to load a kernel module that fails due to version mismatches, missing dependencies, or signature verification issues. This can cause boot failures or device instability. | |
| - The Solution: This version changes one line from false to true to force load the kernel module, bypassing the failure check that would normally prevent loading. | |
| Features: | |
| -> KernelSU-Next | |
| -> SUSFS ඞ v2.0.0 | |
| -> Inline Root Hooks | |
| -> Ptrace Patch Support for Older Kernels (<5.16) | |
| -> IPSet Support for Advanced Network Filtering | |
| -> Wireguard Support | |
| -> BBR v1 Support | |
| -> BBG: https://github.com/vc-teahouse/Baseband-guard | |
| 🔹 BBG (Baseband-guard) | |
| - A lightweight LSM (Linux Security Module) for Android kernel | |
| - Blocks unauthorized writes to critical partitions/device nodes | |
| - Prevents malicious tampering with baseband and boot chain | |
| - Kernel-level protection via LSM hooks | |
| - Reduces risk of soft-brick/hard-brick issues | |
| Kernel Flasher: | |
| -> https://github.com/fatalcoder524/KernelFlasher/ | |
| Manager: | |
| -> Next: https://github.com/KernelSU-Next/KernelSU-Next | |
| Module: | |
| -> https://github.com/sidex15/ksu_module_susfs | |
| EOF | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.NEW_TAG }} | |
| prerelease: ${{ inputs.release_type == 'Pre-Release' }} | |
| files: "" | |
| name: ${{ env.RELEASE_NAME }} | |
| body_path: release_body.md | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: ./downloaded-artifacts | |
| pattern: '*-AnyKernel3' | |
| - name: Upload Release Assets | |
| run: |+ | |
| shopt -s nullglob | |
| anykernel_dirs=(./downloaded-artifacts/*-AnyKernel3/) | |
| if [ ${#anykernel_dirs[@]} -eq 0 ]; then | |
| echo "No AnyKernel3 artifact directories found; skipping upload." | |
| exit 0 | |
| fi | |
| echo "Found ${#anykernel_dirs[@]} artifacts to process" | |
| # Create all ZIPs in parallel | |
| for dir in "${anykernel_dirs[@]}"; do | |
| artifact_name=$(basename "$dir") | |
| echo "Creating ZIP for $artifact_name..." | |
| (cd "$dir" && zip -r -q -9 "$GITHUB_WORKSPACE/${artifact_name}.zip" ./*) & | |
| done | |
| wait | |
| # Upload all ZIPs | |
| for dir in "${anykernel_dirs[@]}"; do | |
| artifact_name=$(basename "$dir") | |
| echo "Uploading ${artifact_name}.zip..." | |
| gh release upload "${{ env.NEW_TAG }}" "${artifact_name}.zip" --clobber | |
| done | |
| - name: Send Telegram Notification | |
| if: inputs.release_type != 'Actions' | |
| run: | | |
| RELEASE_TYPE_TEXT="" | |
| if [ "${{ inputs.release_type }}" == "Pre-Release" ]; then | |
| RELEASE_TYPE_TEXT="🧪 *Pre-Release*" | |
| else | |
| RELEASE_TYPE_TEXT="🚀 *Release*" | |
| fi | |
| curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ | |
| -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \ | |
| -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \ | |
| -F text=" | |
| 🌽 *New Kernel $RELEASE_TYPE_TEXT Uploaded* | |
| 📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }}) | |
| ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) | |
| [🔗 View GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})" \ | |
| -F parse_mode="Markdown" | |