Skip to content

Commit 4febb6a

Browse files
committed
Add v1.6 hooks support and hooks for just KSUN builds
1 parent 2dfc549 commit 4febb6a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/actions/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ runs:
633633
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
634634
echo "KernelSU Next Version: $KSU_VERSION"
635635
echo "✅ KernelSU Next added (commit: ${KSU_COMMIT_SHA:0:8})"
636+
echo "NEED_HOOKS=true" >> $GITHUB_ENV
636637
echo "::endgroup::"
637638
638639
- name: Add KernelSU
@@ -661,6 +662,7 @@ runs:
661662
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
662663
echo "KernelSU Version: $KSU_VERSION"
663664
echo "✅ KernelSU added (commit: ${KSU_COMMIT_SHA:0:8})"
665+
echo "NEED_HOOKS=true" >> $GITHUB_ENV
664666
echo "::endgroup::"
665667
666668
- name: Apply SUSFS Patches
@@ -844,7 +846,17 @@ runs:
844846
set -euo pipefail
845847
echo "::group::Apply KSU hooks"
846848
cd "$CONFIG/kernel_platform/common"
847-
patch -p1 < ../../../kernel_patches/next/scope_min_manual_hooks_v1.4.patch
849+
850+
if [ "${{ inputs.ksu_type }}" = "KSUN" ] && [ "${{ env.KSUVER }}" -gt 12883 ]; then
851+
PATCH=scope_min_manual_hooks_v1.6.patch
852+
elif [ "${{ inputs.ksu_type }}" = "KSU" ]; then
853+
PATCH=scope_min_manual_hooks_v1.6.patch
854+
else
855+
PATCH=scope_min_manual_hooks_v1.4.patch
856+
fi
857+
858+
echo "Using patch: $PATCH"
859+
patch -p1 < "../../../kernel_patches/next/$PATCH"
848860
echo "✅ KSU hooks applied"
849861
echo "::endgroup::"
850862

0 commit comments

Comments
 (0)