action.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 / sukisu-ultra). 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. root_flavor: ${{ inputs.root_flavor }}
  36. - name: Enable SUSFS for KernelSU (tiann)
  37. # tiann/KernelSU main does NOT carry SUSFS, so for the kernelsu flavor we
  38. # apply the enable patch from susfs4ksu onto the KernelSU checkout.
  39. # pershoot dev-susfs (next) and ReSukiSU already include SUSFS, so this is
  40. # a no-op for those flavors.
  41. if: inputs.root_flavor == 'kernelsu'
  42. shell: bash
  43. working-directory: ${{ github.workspace }}/kernel/KernelSU
  44. run: |
  45. set -euo pipefail
  46. PATCH="${{ github.workspace }}/susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch"
  47. if [ ! -f "$PATCH" ]; then
  48. echo "Missing 10_enable_susfs_for_ksu.patch at $PATCH" >&2
  49. exit 1
  50. fi
  51. echo "Applying SUSFS enable patch to KernelSU (tiann) checkout (kernel/KernelSU/kernel)"
  52. patch -p1 < "$PATCH"
  53. - name: Enable SUSFS Kernel Configs
  54. uses: ./.github/actions/susfs-config
  55. - name: Apply SUSFS Patches
  56. uses: ./.github/actions/susfs-patches
  57. with:
  58. version: ${{ inputs.version }}
  59. sublevel: ${{ inputs.sublevel }}
  60. os_patch_level: ${{ inputs.os_patch_level }}
  61. - name: Revert SUSFS Fake Patches
  62. uses: ./.github/actions/susfs-revert-patches
  63. with:
  64. version: ${{ inputs.version }}
  65. sublevel: ${{ inputs.sublevel }}
  66. os_patch_level: ${{ inputs.os_patch_level }}