main.yml 8.5 KB

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