瀏覽代碼

ci(build): reorder artifact upload steps in workflow

Move the patch rejects scanning and upload step earlier in the job sequence to ensure it executes before the kernel build step. This ensures patch reject artifacts are captured even if the build fails later in the process.
TheWildJames 4 月之前
父節點
當前提交
b3a3c88786
共有 2 個文件被更改,包括 16 次插入16 次删除
  1. 2 2
      .github/actions/download-kernel/action.yml
  2. 14 14
      .github/workflows/build.yml

+ 2 - 2
.github/actions/download-kernel/action.yml

@@ -28,7 +28,7 @@ runs:
         FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
 
         # Initialize repo with the target branch
-        repo init -u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --depth=1
+        repo init -u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --depth=1 --partial-clone --clone-filter=blob:limit=10M
 
         # Check if branch is deprecated
         REMOTE_BRANCH=$(git ls-remote https://android.googlesource.com/kernel/common ${FORMATTED_BRANCH})
@@ -44,4 +44,4 @@ runs:
         echo "deprecated=$DEPRECATED" >> $GITHUB_OUTPUT
         
         # Sync kernel source
-        repo --trace sync -c -j$(nproc --all) --fail-fast --no-tags --force-sync --no-clone-bundle
+        repo sync -c -j$(nproc --all) --fail-fast --no-tags --force-sync --no-clone-bundle

+ 14 - 14
.github/workflows/build.yml

@@ -171,6 +171,20 @@ jobs:
     - name: Clean Kernel Flags
       uses: ./.github/actions/clean-kernel-flags
 
+    - name: Scan and collect patch rejects
+      id: scan
+      if: ${{ always() }}
+      uses: ./.github/actions/scan-patch-rejects
+
+    - name: Upload Rejects
+      if: ${{ always() }}
+      uses: actions/upload-artifact@v7
+      with:
+        name: ${{ steps.extract.outputs.file_name }}-Rejects
+        path: patch-rejects/
+        if-no-files-found: ignore
+        compression-level: 9
+
     - name: Build Kernel
       env:
         SOURCE_DATE_EPOCH: ${{ env.SOURCE_DATE_EPOCH }}
@@ -204,11 +218,6 @@ jobs:
     - name: Prepare AnyKernel3 Zip
       uses: ./.github/actions/prepare-anykernel3
 
-    - name: Scan and collect patch rejects
-      id: scan
-      if: ${{ always() }}
-      uses: ./.github/actions/scan-patch-rejects
-
     - name: Upload Artifacts
       uses: actions/upload-artifact@v7
       with:
@@ -216,12 +225,3 @@ jobs:
         path: ${{ github.workspace }}/AnyKernel3/**
         if-no-files-found: ignore
         compression-level: 9
-
-    - name: Upload Rejects
-      if: ${{ always() }}
-      uses: actions/upload-artifact@v7
-      with:
-        name: ${{ steps.extract.outputs.file_name }}-Rejects
-        path: patch-rejects/
-        if-no-files-found: ignore
-        compression-level: 9