main.yml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. name: Build Kernels
  2. permissions:
  3. contents: write
  4. actions: write
  5. on:
  6. # push:
  7. # branches:
  8. # - main
  9. # paths:
  10. # - '.github/workflows/**'
  11. # pull_request:
  12. # branches:
  13. # - main
  14. # paths:
  15. # - '.github/workflows/**'
  16. workflow_dispatch:
  17. inputs:
  18. release_type:
  19. description: "Choose Release Type"
  20. required: true
  21. type: choice
  22. options:
  23. - Actions
  24. - Pre-Release
  25. - Release
  26. default: Actions
  27. build_selection:
  28. description: "Choose which kernels to build"
  29. required: true
  30. type: choice
  31. options:
  32. - All
  33. - Android12-5.10
  34. - Android13-5.10
  35. - Android13-5.15
  36. - Android14-5.15
  37. - Android14-6.1
  38. - Android15-6.6
  39. default: All
  40. jobs:
  41. build-a12-5-10:
  42. if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android12-5.10')
  43. uses: ./.github/workflows/kernel-a12-5-10.yml
  44. secrets: inherit
  45. build-a13-5-10:
  46. if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android13-5.10')
  47. uses: ./.github/workflows/kernel-a13-5-10.yml
  48. secrets: inherit
  49. build-a13-5-15:
  50. if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android13-5.15')
  51. uses: ./.github/workflows/kernel-a13-5-15.yml
  52. secrets: inherit
  53. build-a14-5-15:
  54. if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android14-5.15')
  55. uses: ./.github/workflows/kernel-a14-5-15.yml
  56. secrets: inherit
  57. build-a14-6-1:
  58. if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android14-6.1')
  59. uses: ./.github/workflows/kernel-a14-6-1.yml
  60. secrets: inherit
  61. build-a15-6-6:
  62. if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android15-6.6')
  63. uses: ./.github/workflows/kernel-a15-6-6.yml
  64. secrets: inherit
  65. release:
  66. runs-on: ubuntu-latest
  67. if: inputs.release_type != 'Actions'
  68. needs:
  69. - build-a12-5-10
  70. - build-a13-5-10
  71. - build-a13-5-15
  72. - build-a14-5-15
  73. - build-a14-6-1
  74. - build-a15-6-6
  75. env:
  76. GH_TOKEN: ${{ github.token }}
  77. RELEASE_NAME: "GKI Kernels With WKSU & SUSFS v1.5.12"
  78. RELEASE_BODY: ""
  79. steps:
  80. - name: Checkout code
  81. uses: actions/checkout@v4
  82. - name: Generate New Tag
  83. if: inputs.release_type != 'Actions'
  84. run: |
  85. LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name' 2>/dev/null || echo "")
  86. if [ -z "$LATEST_TAG" ]; then
  87. LATEST_TAG="v1.5.12-r0"
  88. fi
  89. NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
  90. echo "New tag: $NEW_TAG"
  91. echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
  92. - name: Download Artifacts
  93. uses: actions/download-artifact@v5
  94. with:
  95. path: ./downloaded-artifacts
  96. pattern: '*-AnyKernel3'
  97. - name: Set release body
  98. run: |
  99. cat << 'EOF' > release_body.md
  100. **IMPORTANT DISCLAIMER**
  101. This software is provided for testing and educational purposes only. Use at your own risk.
  102. The developers are not responsible for any damage, data loss, or issues that may occur.
  103. Please ensure you have proper backups before installation.
  104. 🔹 Normal
  105. - Default kernel configuration
  106. - Standard kernel module loading behavior
  107. - Recommended for most users
  108. 🔹 Bypass
  109. - Includes module check bypass modifications
  110. - 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.
  111. - 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.
  112. - 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.
  113. Features:
  114. -> Wild KSU
  115. -> Multi Manager Support for WKSU, KernelSU-Next! Needs Testing: KSU, MKSU RKSU, xxKSU, KowSU and SukiSU (Best compatibility with WKSU, no support will be provided for other managers)
  116. -> SUSFS ඞ v1.5.12
  117. -> Scope-Minimized Manual hooks v1.4
  118. -> Ptrace Patch Support for Older Kernels (<5.16)
  119. -> IPSet Support for Advanced Network Filtering
  120. -> Wireguard Support
  121. -> BBR v1 Support
  122. -> Added BBG support to prevent unauthorised writes to certain partitions: https://github.com/vc-teahouse/Baseband-guard
  123. 🔹 BBG (Baseband-guard)
  124. - A lightweight LSM (Linux Security Module) for Android kernel
  125. - Blocks unauthorized writes to critical partitions/device nodes
  126. - Prevents malicious tampering with baseband and boot chain
  127. - Kernel-level protection via LSM hooks
  128. - Reduces risk of soft-brick/hard-brick issues
  129. Notes:
  130. -> SUS SU Mode 2 will show as disabled or not compatible due to non-kprobe hooks and is not needed anymore!
  131. -> Official Kernel Flasher is broken with latest susfs, try https://github.com/fatalcoder524/KernelFlasher/
  132. -> **boot.img files**: Available as CI artifacts only (not included in releases) - download from the Actions tab
  133. -> **Warning**: boot.img files may not boot on some devices
  134. -> **Note:** For detailed commit information and component versions, please check the [build summary](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) in the GitHub Actions workflow that generated this release.
  135. Module:
  136. -> https://github.com/sidex15/ksu_module_susfs
  137. Managers:
  138. -> WKSU: https://github.com/WildKernels/Wild_KSU
  139. -> Next: https://github.com/KernelSU-Next/KernelSU-Next
  140. EOF
  141. - name: Create GitHub Release
  142. uses: softprops/action-gh-release@v2
  143. with:
  144. tag_name: ${{ env.NEW_TAG }}
  145. prerelease: ${{ inputs.release_type == 'Pre-Release' }}
  146. files: ""
  147. name: ${{ env.RELEASE_NAME }}
  148. body_path: release_body.md
  149. - name: Upload Release Assets
  150. run: |
  151. shopt -s nullglob
  152. anykernel_dirs=(./downloaded-artifacts/*/)
  153. if [ ${#anykernel_dirs[@]} -eq 0 ]; then
  154. echo "No artifact directories found under ./downloaded-artifacts; skipping upload."
  155. else
  156. for dir in "${anykernel_dirs[@]}"; do
  157. # Check if this is an AnyKernel3 artifact directory
  158. if [[ "$(basename "$dir")" == *"-AnyKernel3" ]]; then
  159. artifact_name=$(basename "$dir")
  160. echo "Creating ZIP for $artifact_name..."
  161. # Navigate into the directory and zip its contents directly
  162. cd "$dir"
  163. zip -r -9 "../../${artifact_name}.zip" ./*
  164. cd - > /dev/null
  165. echo "Uploading ${artifact_name}.zip..."
  166. gh release upload ${{ env.NEW_TAG }} "${artifact_name}.zip"
  167. fi
  168. done
  169. fi
  170. - name: Send Telegram Notification
  171. if: inputs.release_type != 'Actions'
  172. run: |
  173. RELEASE_TYPE_TEXT=""
  174. if [ "${{ inputs.release_type }}" == "Pre-Release" ]; then
  175. RELEASE_TYPE_TEXT="🧪 *Pre-Release*"
  176. else
  177. RELEASE_TYPE_TEXT="🚀 *Release*"
  178. fi
  179. curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
  180. -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
  181. -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \
  182. -F text="
  183. 🌽 *New Kernel $RELEASE_TYPE_TEXT Uploaded*
  184. 📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
  185. ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
  186. [🔗 View GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})" \
  187. -F parse_mode="Markdown"