action.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: 'Setup SUSFS'
  2. description: 'Clone and apply SUSFS patches with version-specific fixes'
  3. inputs:
  4. susfs_commit:
  5. description: 'SUSFS commit hash (empty = latest on auto-derived gki-{version} branch)'
  6. required: false
  7. default: ""
  8. version:
  9. description: 'Kernel config version (e.g., android15-6.6)'
  10. required: true
  11. android_version:
  12. description: 'Android version (e.g., android15)'
  13. required: true
  14. kernel_version:
  15. description: 'Kernel version (e.g., 6.6)'
  16. required: true
  17. os_patch_level:
  18. description: 'OS patch level (e.g., 2024-07)'
  19. required: true
  20. sublevel:
  21. description: 'Kernel sublevel'
  22. required: true
  23. root_flavor:
  24. description: 'Selected root implementation (kernelsu / next / resukisu). KernelSU (tiann main) needs the 10_enable_susfs_for_ksu patch; other flavors already ship SUSFS.'
  25. required: false
  26. default: ""
  27. runs:
  28. using: "composite"
  29. steps:
  30. - name: Setup SUSFS Branch
  31. uses: ./.github/actions/susfs-setup
  32. with:
  33. susfs_commit: ${{ inputs.susfs_commit }}
  34. version: ${{ inputs.version }}
  35. - name: Enable SUSFS for KernelSU (tiann)
  36. # tiann/KernelSU main does NOT carry SUSFS, so for the kernelsu flavor we
  37. # apply the enable patch from susfs4ksu onto the KernelSU checkout.
  38. # pershoot dev-susfs (next) and ReSukiSU already include SUSFS, so this is
  39. # a no-op for those flavors.
  40. if: inputs.root_flavor == 'kernelsu'
  41. shell: bash
  42. working-directory: ${{ github.workspace }}/kernel/KernelSU
  43. run: |
  44. set -euo pipefail
  45. PATCH="${{ github.workspace }}/susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch"
  46. if [ ! -f "$PATCH" ]; then
  47. echo "Missing 10_enable_susfs_for_ksu.patch at $PATCH" >&2
  48. exit 1
  49. fi
  50. echo "Applying SUSFS enable patch to KernelSU (tiann) checkout (kernel/KernelSU/kernel)"
  51. patch -p1 < "$PATCH"
  52. - name: Enable SUSFS Kernel Configs
  53. uses: ./.github/actions/susfs-config
  54. - name: Apply SUSFS Patches
  55. uses: ./.github/actions/susfs-patches
  56. with:
  57. version: ${{ inputs.version }}
  58. sublevel: ${{ inputs.sublevel }}
  59. os_patch_level: ${{ inputs.os_patch_level }}
  60. - name: Revert SUSFS Fake Patches
  61. uses: ./.github/actions/susfs-revert-patches
  62. with:
  63. version: ${{ inputs.version }}
  64. sublevel: ${{ inputs.sublevel }}
  65. os_patch_level: ${{ inputs.os_patch_level }}