Sfoglia il codice sorgente

Update build-kernel-a14-6.1.yml

James McConnell 1 anno fa
parent
commit
c648ccdd3e
1 ha cambiato i file con 14 aggiunte e 1 eliminazioni
  1. 14 1
      .github/workflows/build-kernel-a14-6.1.yml

+ 14 - 1
.github/workflows/build-kernel-a14-6.1.yml

@@ -162,13 +162,26 @@ jobs:
           $REPO --version
           $REPO --trace sync -c -j$(nproc --all) --no-tags --fail-fast
 
+      - name: Determine the branch for kernelsu
+        run: |
+          if [[ "${{ inputs.next_branch }}" == "Stable" ]]; then
+            echo "BRANCH=-" >> $GITHUB_ENV
+          elif [[ "${{ inputs.next_branch }}" == "Dev" ]]; then
+            echo "BRANCH=-s next" >> $GITHUB_ENV
+          elif [[ "${{ inputs.next_branch }}" == "Other" && -n "${{ inputs.next_branch_other }}" ]]; then
+            echo "BRANCH=-s ${{ inputs.next_branch_other }}" >> $GITHUB_ENV
+          else
+            echo "Error: Custom branch not provided for 'Other'" >&2
+            exit 1
+          fi
+
       - name: Add KernelSU
         run: |
           echo "Changing to configuration directory: $CONFIG..."
           cd "$CONFIG"
           
           echo "Adding KernelSU..."
-          curl -LSs "https://raw.githubusercontent.com/rifsxd/KernelSU-Next/next/kernel/setup.sh" | bash -
+          curl -LSs "https://raw.githubusercontent.com/rifsxd/KernelSU-Next/next/kernel/setup.sh" | bash $BRANCH
 
       - name: Apply SUSFS Patches
         run: |