main.yml 7.1 KB

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