瀏覽代碼

refactor: remove use_repo flag, repo is now the only download path

- Commented out non-repo steps in download-kernel action (manifest.xml, fast_parallel_download)
- Removed use_repo input from download-kernel, build.yml, prepare.yml, and main.yml
- Repo sync now always runs unconditionally
TheWildJames 2 月之前
父節點
當前提交
3179c821e2
共有 4 個文件被更改,包括 36 次插入63 次删除
  1. 36 42
      .github/actions/download-kernel/action.yml
  2. 0 4
      .github/workflows/build.yml
  3. 0 11
      .github/workflows/main.yml
  4. 0 6
      .github/workflows/prepare.yml

+ 36 - 42
.github/actions/download-kernel/action.yml

@@ -14,9 +14,6 @@ inputs:
   os_patch_level:
     description: 'OS patch level (e.g., 2024-01)'
     required: true
-  use_repo:
-    description: 'Use repo for downloading kernel source'
-    required: false
 
 outputs:
   deprecated_branch:
@@ -27,7 +24,6 @@ runs:
   using: composite
   steps:
     - name: Initialize and Sync Kernel Repository
-      if: ${{ inputs.use_repo == 'true' }}
       id: sync
       shell: bash
       working-directory: ${{ github.workspace }}/kernel
@@ -85,44 +81,42 @@ runs:
           attempt=$((attempt+1))
         done
 
-    - name: Download manifest.xml for branch (with deprecated fallback)
-      shell: bash
-      if: ${{ inputs.use_repo != 'true' }}
-      working-directory: ${{ github.workspace }}/kernel
-      run: |
-        set -euo pipefail
-        VERSION="${{ inputs.version }}"
-        ANDROID_PART=$(echo "$VERSION" | cut -d- -f1)
-        KERNEL_PART=$(echo "$VERSION" | cut -d- -f2)
-        FORMATTED_BRANCH="${ANDROID_PART}-${KERNEL_PART}-${{ inputs.os_patch_level }}"
-        MAIN_MANIFEST_URL="https://android.googlesource.com/kernel/manifest/+/refs/heads/common-${FORMATTED_BRANCH}/default.xml?format=TEXT"
-        DEPRECATED_MANIFEST_URL="https://android.googlesource.com/kernel/manifest/+/refs/heads/deprecated/common-${FORMATTED_BRANCH}/default.xml?format=TEXT"
-        echo "Trying to fetch manifest from $MAIN_MANIFEST_URL"
-        if curl -fsSL "$MAIN_MANIFEST_URL" | base64 -d > manifest.xml; then
-          echo "Fetched manifest from $MAIN_MANIFEST_URL"
-        else
-          echo "Main manifest fetch failed, trying deprecated branch."
-          echo "⚠ Note: Branch common-${FORMATTED_BRANCH} is considered deprecated."
-          if curl -fsSL "$DEPRECATED_MANIFEST_URL" | base64 -d > manifest.xml; then
-            echo "Fetched manifest from $DEPRECATED_MANIFEST_URL"
-          else
-            echo "ERROR: Neither main nor deprecated branch exists for $FORMATTED_BRANCH" >&2
-            exit 22
-          fi
-        fi
-
-    - name: Debug Show manifest.xml
-      shell: bash
-      if: ${{ inputs.use_repo != 'true' }}
-      working-directory: ${{ github.workspace }}/kernel
-      run: cat manifest.xml
-      
-    - name: Fast Parallel Archive Download
-      shell: bash
-      if: ${{ inputs.use_repo != 'true' }}
-      working-directory: ${{ github.workspace }}/kernel
-      run: |
-        python "${{ github.workspace }}/.github/actions/download-kernel/fast_parallel_download.py"
+    # --- Non-repo steps (commented out; we only use repo now) ---
+    # - name: Download manifest.xml for branch (with deprecated fallback)
+    #   shell: bash
+    #   working-directory: ${{ github.workspace }}/kernel
+    #   run: |
+    #     set -euo pipefail
+    #     VERSION="${{ inputs.version }}"
+    #     ANDROID_PART=$(echo "$VERSION" | cut -d- -f1)
+    #     KERNEL_PART=$(echo "$VERSION" | cut -d- -f2)
+    #     FORMATTED_BRANCH="${ANDROID_PART}-${KERNEL_PART}-${{ inputs.os_patch_level }}"
+    #     MAIN_MANIFEST_URL="https://android.googlesource.com/kernel/manifest/+/refs/heads/common-${FORMATTED_BRANCH}/default.xml?format=TEXT"
+    #     DEPRECATED_MANIFEST_URL="https://android.googlesource.com/kernel/manifest/+/refs/heads/deprecated/common-${FORMATTED_BRANCH}/default.xml?format=TEXT"
+    #     echo "Trying to fetch manifest from $MAIN_MANIFEST_URL"
+    #     if curl -fsSL "$MAIN_MANIFEST_URL" | base64 -d > manifest.xml; then
+    #       echo "Fetched manifest from $MAIN_MANIFEST_URL"
+    #     else
+    #       echo "Main manifest fetch failed, trying deprecated branch."
+    #       echo "⚠ Note: Branch common-${FORMATTED_BRANCH} is considered deprecated."
+    #       if curl -fsSL "$DEPRECATED_MANIFEST_URL" | base64 -d > manifest.xml; then
+    #         echo "Fetched manifest from $DEPRECATED_MANIFEST_URL"
+    #       else
+    #         echo "ERROR: Neither main nor deprecated branch exists for $FORMATTED_BRANCH" >&2
+    #         exit 22
+    #       fi
+    #     fi
+    #
+    # - name: Debug Show manifest.xml
+    #   shell: bash
+    #   working-directory: ${{ github.workspace }}/kernel
+    #   run: cat manifest.xml
+    #
+    # - name: Fast Parallel Archive Download
+    #   shell: bash
+    #   working-directory: ${{ github.workspace }}/kernel
+    #   run: |
+    #     python "${{ github.workspace }}/.github/actions/download-kernel/fast_parallel_download.py"
 
     - name: Capture Kernel Common Commit Metadata
       shell: bash

+ 0 - 4
.github/workflows/build.yml

@@ -27,9 +27,6 @@ on:
       feature_set:
         required: true
         type: string
-      use_repo:
-        required: false
-        type: boolean
       use_latest_commits:
         required: false
         type: boolean
@@ -82,7 +79,6 @@ jobs:
         android_version: ${{ inputs.android_version }}
         kernel_version: ${{ inputs.kernel_version }}
         os_patch_level: ${{ inputs.os_patch_level }}
-        use_repo: ${{ inputs.use_repo }}
 
     - name: Set Build Timestamp from Kernel Commit
       shell: bash

+ 0 - 11
.github/workflows/main.yml

@@ -44,10 +44,6 @@ on:
           - NONE
           - FULL
         default: FULL
-      use_repo:
-        description: "Use repo for downloading kernel source"
-        type: boolean
-        default: true
       use_latest_commits:
         description: "Use branch tip for KernelSU and SUSFS instead of pinned commits"
         type: boolean
@@ -64,7 +60,6 @@ jobs:
     with:
       config_file: .github/config/android12-5.10.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 
@@ -74,7 +69,6 @@ jobs:
     with:
       config_file: .github/config/android13-5.10.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 
@@ -84,7 +78,6 @@ jobs:
     with:
       config_file: .github/config/android13-5.15.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 
@@ -94,7 +87,6 @@ jobs:
     with:
       config_file: .github/config/android14-5.15.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 
@@ -104,7 +96,6 @@ jobs:
     with:
       config_file: .github/config/android14-6.1.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 
@@ -114,7 +105,6 @@ jobs:
     with:
       config_file: .github/config/android15-6.6.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 
@@ -124,7 +114,6 @@ jobs:
     with:
       config_file: .github/config/android16-6.12.json
       feature_set: ${{ inputs.feature_set || 'FULL' }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit
 

+ 0 - 6
.github/workflows/prepare.yml

@@ -11,11 +11,6 @@ on:
         description: "Feature Set"
         required: false
         type: string
-      use_repo:
-        description: "Use repo for downloading kernel source"
-        required: false
-        type: boolean
-        default: false
       use_latest_commits:
         description: "Use branch tip for KernelSU and SUSFS instead of pinned commits"
         required: false
@@ -92,6 +87,5 @@ jobs:
       os_patch_level: ${{ matrix.os_patch_level }}
       variant: ${{ matrix.variant }}
       feature_set: ${{ inputs.feature_set }}
-      use_repo: ${{ inputs.use_repo }}
       use_latest_commits: ${{ inputs.use_latest_commits }}
     secrets: inherit