| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491 |
- name: Kernel Build Process
- permissions:
- contents: write
- actions: write
- on:
- workflow_call:
- inputs:
- branch:
- required: true
- type: string
- android_version:
- required: true
- type: string
- kernel_version:
- required: true
- type: string
- jobs:
- build-samsung-gki:
- name: "${{ inputs.branch }}-${{ inputs.kernel_version }}-${{ inputs.android_version }}"
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- steps:
- - name: Free Disk Space
- if: true
- uses: endersonmenezes/free-disk-space@v3 # Use @main for latest, @v3 for stable
- with:
- remove_android: true
- remove_dotnet: true
- remove_haskell: true
- remove_tool_cache: true
- remove_swap: true
- remove_packages: "azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
- remove_packages_one_command: true
- remove_folders: "/usr/share/swift /usr/share/miniconda /usr/share/az* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell /usr/local/julia /usr/local/aws-cli /usr/local/aws-sam-cli /usr/share/gradle"
- rm_cmd: "rmz" # Use 'rmz' for faster deletion (default: 'rm')
- rmz_version: "3.1.1" # Required when rm_cmd is 'rmz'
- testing: false
-
-
- - name: Set CONFIG Environment Variable
- run: |
- # Set CONFIG dynamically based on inputs values
- CONFIG="${{ inputs.branch }}-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
- # Set CONFIG as an environment variable for future steps
- echo "CONFIG=$CONFIG" >> $GITHUB_ENV
- - name: Clone AnyKernel3 and Other Dependencies
- run: |
- ANYKERNEL_BRANCH="gki-2.0"
- SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
-
- git clone https://github.com/WildKernels/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
- git clone https://github.com/WildKernels/kernel_patches.git
- git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
-
- - name: Clone Kernel Source
- run: |
- git clone https://github.com/WildKernels/Samsung_Kernels.git -b ${{ inputs.branch }} $CONFIG
-
- - name: Set Path Environment Variables
- run: |
- ROOT="$GITHUB_WORKSPACE"
- SUSFS4KSU="$ROOT/susfs4ksu"
- KERNEL_PATCHES="$ROOT/kernel_patches"
- ANYKERNEL3="$ROOT/AnyKernel3"
- if [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui7" ]]; then
- COMMON="$CONFIG"
- elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
- COMMON="$CONFIG/kernel-6.6"
- elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" ]]; then
- COMMON="$CONFIG/kernel"
- else
- COMMON="$CONFIG/kernel_platform/common"
- fi
- DEFCONFIG="$COMMON/arch/arm64/configs/gki_defconfig"
- echo "ROOT=$ROOT" >> $GITHUB_ENV
- echo "SUSFS4KSU=$SUSFS4KSU" >> $GITHUB_ENV
- echo "KERNEL_PATCHES=$KERNEL_PATCHES" >> $GITHUB_ENV
- echo "ANYKERNEL3=$ANYKERNEL3" >> $GITHUB_ENV
- echo "COMMON=$COMMON" >> $GITHUB_ENV
- echo "DEFCONFIG=$DEFCONFIG" >> $GITHUB_ENV
-
- - name: Extract all tar.xz files and delete them
- run: |
- cd "$CONFIG"
- find . -type f -name '*.tar.xz' -print0 | while IFS= read -r -d '' file; do
- echo "Extracting $file"
- tar -xf "$file"
- rm "$file"
- done
- - name: Add Wild_KSU
- run: |
- cd "$COMMON"
- curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/wild/kernel/setup.sh" | bash -s stable
- - name: Getting Wild_KSU Version
- run: |
- cd "$COMMON/Wild_KSU/kernel"
-
- KSU_DIR=$(pwd)
- KBUILD="Kbuild"
- BASE_VERSION=30000
- if [ -d "$KSU_DIR/.git" ]; then
- echo "✔ Git repo detected"
- # Unshallow if needed
- if [ -f "$KSU_DIR/.git/shallow" ]; then
- git -C "$KSU_DIR" fetch --unshallow || true
- fi
- # Get commit count
- KSU_GIT_VERSION=$(git -C "$KSU_DIR" rev-list --count HEAD)
- # Calculate version
- KSU_VERSION=$((BASE_VERSION + KSU_GIT_VERSION))
- # Get latest tag (safe)
- KSU_GIT_TAG=$(git -C "$KSU_DIR" describe --tags --abbrev=0 2>/dev/null || echo "v0.0.1")
- else
- echo "⚠ Not a git repo, using defaults"
- KSU_VERSION=33151
- KSU_GIT_TAG="v3.0.0"
- fi
- echo "Computed version: $KSU_VERSION"
- echo "Computed tag: $KSU_GIT_TAG"
- # Export for CI (optional)
- echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV
- echo "KSU_VERSION_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
- # --- Update Kbuild fallback values ---
- # Update numeric fallback
- sed -i "s/KSU_VERSION_FALLBACK := [0-9]\+/KSU_VERSION_FALLBACK := ${KSU_VERSION}/" "$KBUILD"
- # Update tag fallback
- sed -i "s/KSU_VERSION_TAG_FALLBACK := .*/KSU_VERSION_TAG_FALLBACK := ${KSU_GIT_TAG}/" "$KBUILD"
- echo "✅ Updated fallback values in $KBUILD"
- - name: Apply SUSFS Patches
- run: |
- cd "$COMMON"
- # Apply compatibility fixes
- SUSFS_VERSION="2.0.0"
-
- cp "$SUSFS4KSU/kernel_patches/fs/"* ./fs/
- cp "$SUSFS4KSU/kernel_patches/include/linux/"* ./include/linux/
- cp "$SUSFS4KSU/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch" ./
- # Apply SUSFS core patch
- patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true
- # Fix SUSFS rejects
- if [[ "${{ inputs.branch }}" == "SM-S928B-Oneui7" || "${{ inputs.branch }}" == "SM-S928B-Oneui8" ]]; then
- cp "$KERNEL_PATCHES/samsung/S24U/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- elif [[ "${{ inputs.branch }}" == "SM-A366B" ]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- patch -p1 < fix_taskmmu.patch
- elif [[ "${{ inputs.branch }}" == "SM-X916B" ]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- patch -p1 < fix_exec.patch
- elif [[ "${{ inputs.branch }}" == "SM-F946N" ]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- patch -p1 < fix_exec.patch
- elif [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui7"]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- patch -p1 < Disable_CRC.patch
- patch -p1 < fix_exec.patch
- elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- patch -p1 < fix_taskmmu.patch
- elif [[ "${{ inputs.branch }}" == "SM-S916B-Oneui8" ]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- patch -p1 < fix_exec.patch
- elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" ]]; then
- cp "$KERNEL_PATCHES/samsung/${{ inputs.branch }}/"* ./
- patch -p1 < fix_namespace.patch
- patch -p1 < fix_base.patch
- fi
- - name: Add BBG
- run: |
- cd "$COMMON"
- echo "Adding BBG..."
- curl -LSs https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
- echo "CONFIG_BBG=y" >> arch/arm64/configs/gki_defconfig
- sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' security/Kconfig
- - name: Set Kernel Configuration Variables
- run: |
-
- echo "Initializing kernel configuration..."
- cat >> "$DEFCONFIG" << 'EOF'
- # KernelSU Configuration
- CONFIG_KSU=y
- CONFIG_KSU_SUSFS=y
- # Mountify Support
- CONFIG_TMPFS_XATTR=y
- CONFIG_TMPFS_POSIX_ACL=y
- # nuke root protection
- CONFIG_UH=n
- CONFIG_UH_RKP=n
- CONFIG_UH_LKMAUTH=n
- CONFIG_UH_LKM_BLOCK=n
- CONFIG_RKP_CFP_JOPP=n
- CONFIG_RKP_CFP=n
- CONFIG_SECURITY_DEFEX=n
- CONFIG_PROCA=n
- CONFIG_FIVE=n
- EOF
- if [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui7" ]]; then
- cat >> "$DEFCONFIG" << 'EOF'
- #Force Load Kernel Modules
- CONFIG_MODULES=y
- CONFIG_MODULE_FORCE_LOAD=y
- CONFIG_MODULE_UNLOAD=y
- CONFIG_MODULE_FORCE_UNLOAD=y
- CONFIG_MODVERSIONS=y
- CONFIG_MODULE_SRCVERSION_ALL=n
- CONFIG_MODULE_SIG=n
- CONFIG_MODULE_COMPRESS=n
- CONFIG_TRIM_UNUSED_KSYMS=n
- EOF
- # Modify CONFIG_LSM line to insert baseband_guard
- sed -i '/^CONFIG_LSM=/ s/lockdown,/lockdown,baseband_guard,/' "$DEFCONFIG"
- fi
-
- # Remove check_defconfig
- sed -i 's/check_defconfig//' ./build.config.gki
- - name: Change Kernel Name
- run: |
- cd "$COMMON"
- #Add Wild to Kernel Version
- sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./scripts/setlocalversion
- #Set Kernel Timestamp
- perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT Sun Apr 20 04:20:00 UTC 2025"}' ./scripts/mkcompile_h
- if [ -f "build/build.sh" ]; then
- #Remove Dirty Flag
- sed -i 's/-dirty//' ./scripts/setlocalversion
- else
- #Remove Abi Exports and Error
- rm -rf ./android/abi_gki_protected_exports_*
- perl -pi -e 's/^\s*"protected_exports_list"\s*:\s*"android\/abi_gki_protected_exports_aarch64",\s*$//;' ./BUILD.bazel
- fi
- - name: Set file name
- run: |
- ARTIFACT_BASE="${{ inputs.branch }}-${{ inputs.kernel_version }}-${{ inputs.android_version }}"
- echo "ARTIFACT_BASE=$ARTIFACT_BASE" >> $GITHUB_ENV
- echo "FILE_NAME=$ARTIFACT_BASE" >> $GITHUB_ENV
- - name: Build
- run : |
- set -e
- set -x
- cd "$CONFIG"
- echo "Building the kernel..."
- if [[ "${{ inputs.branch }}" == "SM-S928B-Oneui7" || "${{ inputs.branch }}" == "SM-S928B-Oneui8" ]]; then
- chmod +x build_kernel_GKI.sh
- ./build_kernel_GKI.sh
- elif [[ "${{ inputs.branch }}" == "SM-X916B" || "${{ inputs.branch }}" == "SM-F946N" || "${{ inputs.branch }}" == "SM-S916B-Oneui8" ]]; then
- chmod +x build_kernel_GKI.sh
- LTO=thin ./build_kernel_GKI.sh || true
- elif [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui7" ]]; then
- sudo apt update
- sudo apt-get install -y libyaml-dev
- LTO=thin ./build_kernel.sh || true
- elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
- chmod +x build_script.sh
- touch ./kernel-6.6/abi_symbollist.raw
- touch ./kernel-6.6/abi_symbollist
- ./build_script.sh
- elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" ]]; then
- tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
- else
- #temporarily using this until i can figure out the other phones build script issues
- cd kernel_platform
- tools/bazel build --config=fast --lto=thin //common:kernel_aarch64_dist || exit 1
- fi
-
- - name: Prepare AnyKernel3
- run: |
- cd "$CONFIG"
- # Copy Image from normal build locations
- #if [ -f "./$CONFIG/out/${{ inputs.android_version }}-${{ inputs.kernel_version }}/dist/Image" ]; then
- # cp ./$CONFIG/out/${{ inputs.android_version }}-${{ inputs.kernel_version }}/dist/Image AnyKernel3/Image
- #elif [ -f "./$CONFIG/bazel-bin/common/kernel_aarch64/Image" ]; then
- # cp ./$CONFIG/bazel-bin/common/kernel_aarch64/Image AnyKernel3/Image
- #else
- # echo "Error: Image file not found in any expected location"
- # exit 1
- #fi
-
- if [[ "${{ inputs.branch }}" == "SM-S928B-Oneui7" || "${{ inputs.branch }}" == "SM-S928B-Oneui8" ]]; then
- cp ./kernel_platform/sec/dist/Image "$ANYKERNEL3/Image"
- elif [[ -f ./$CONFIG/bazel-bin/common/kernel_aarch64/Image ]]; then
- cp ./$CONFIG/bazel-bin/common/kernel_aarch64/Image "$ANYKERNEL3/Image"
- elif [[ "${{ inputs.branch }}" == "SM-X916B" || "${{ inputs.branch }}" == "SM-F946N" || "${{ inputs.branch }}" == "SM-S916B-Oneui8" ]]; then
- cp ./out/msm-kalama-kalama-gki/dist/Image "$ANYKERNEL3/Image"
- elif [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui7" ]]; then
- cp ./arch/arm64/boot/Image "$ANYKERNEL3/Image"
- elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
- cp ./kernel-6.6/out/arch/arm64/boot/Image "$ANYKERNEL3/Image"
- elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" ]]; then
- cp ./out/s5e9945_user/dist/Image "$ANYKERNEL3/Image"
- else
- echo "Error: Image file not found in any expected location"
- exit 1
- fi
- - name: Create Bootimgs Folder and Copy Images for Android 14/15
- if: ${{ inputs.android_version == 'android14' || inputs.android_version == 'android15' }}
- run: |
- #mkdir bootimgs
- #cp ./$CONFIG/bazel-bin/common/kernel_aarch64/Image ./bootimgs
- #cp ./$CONFIG/bazel-bin/common/kernel_aarch64/Image.lz4 ./bootimgs
- #cp ./$CONFIG/bazel-bin/common/kernel_aarch64/Image ./${{ env.FILE_NAME }}-Image
- #cp ./$CONFIG/bazel-bin/common/kernel_aarch64/Image.lz4 ./${{ env.FILE_NAME }}-Image.lz4
- # Create gzip of the Image file
- #gzip -n -k -f -9 ./${{ env.FILE_NAME }}-Image > ./${{ env.FILE_NAME }}-Image.gz
- #gzip -n -k -f -9 ./bootimgs/Image > ./bootimgs/Image.gz
- #cp ./boot-lz4.img ../${{ env.FILE_NAME }}-boot-lz4.img
- - name: Upload AnyKernel3 Artifacts
- id: upload_ak3
- uses: actions/upload-artifact@v4
- with:
- name: ${{ env.FILE_NAME }}-AnyKernel3
- path: |
- ./AnyKernel3/**
- compression-level: 9
-
- - name: Scan and collect patch rejects
- if: ${{ always() }}
- run: |
- set -e
- CONFIG_DIR="$CONFIG"
- REJECTS_DIR="$GITHUB_WORKSPACE/patch-rejects"
- mkdir -p "$REJECTS_DIR"
- # Find all .rej files under the configuration directory
- mapfile -t REJS < <(find "$CONFIG_DIR" -type f -name '*.rej')
- REJ_COUNT=${#REJS[@]}
- echo "Found $REJ_COUNT .rej files under $CONFIG_DIR"
- echo "REJ_COUNT=$REJ_COUNT" >> $GITHUB_ENV
- if [ "$REJ_COUNT" -gt 0 ]; then
- for REJ in "${REJS[@]}"; do
- # Relative path from $CONFIG
- REL="${REJ#"$CONFIG_DIR"/}"
- DEST="$REJECTS_DIR/$REL"
- mkdir -p "$(dirname "$DEST")"
- cp "$REJ" "$DEST"
- # Copy the associated original file alongside the .rej
- ORIG="${REJ%.rej}"
- if [ -f "$ORIG" ]; then
- ORIG_DEST="$REJECTS_DIR/${REL%.rej}"
- mkdir -p "$(dirname "$ORIG_DEST")"
- cp "$ORIG" "$ORIG_DEST"
- fi
- echo "$REL" >> "$REJECTS_DIR/index.txt"
- done
- fi
- - name: Generate Build Summary
- if: ${{ always() }}
- run: |
- # Create build summary file for inclusion in Misc artifact
- echo "# Kernel Build Summary" > build_summary.md
-
- # Add build variant header
- echo "## ${{ env.FILE_NAME }}" >> build_summary.md
-
- # Add build info
- echo "## Build Information" >> build_summary.md
- echo "- **Android Version**: ${{ inputs.android_version }}" >> build_summary.md
- echo "- **Kernel Version**: ${{ inputs.kernel_version }}.${{ inputs.sub_level }}" >> build_summary.md
- echo "- **BBG**: Installed" >> build_summary.md
- echo "- **Bypass Mode**: ${{ matrix.apply_bypass }}" >> build_summary.md
- echo "" >> build_summary.md
- # Get Wild_KSU commit
- if [ -d "$CONFIG/Wild_KSU" ]; then
- cd "$CONFIG/Wild_KSU"
- WKSU_COMMIT=$(git rev-parse HEAD)
- WKSU_URL="https://github.com/WildKernels/Wild_KSU/commit/$WKSU_COMMIT"
- echo "- **Wild_KSU**: [$WKSU_COMMIT]($WKSU_URL)" >> "$GITHUB_WORKSPACE/build_summary.md"
- cd "$GITHUB_WORKSPACE"
- else
- echo "- **Wild_KSU**: not present" >> build_summary.md
- fi
-
- # Get Baseband-guard commit
- if [ -d "$CONFIG/Baseband-guard" ]; then
- cd "$CONFIG/Baseband-guard"
- BBG_COMMIT=$(git rev-parse HEAD)
- BBG_URL="https://github.com/vc-teahouse/Baseband-guard/commit/$BBG_COMMIT"
- echo "- **Baseband-guard**: [$BBG_COMMIT]($BBG_URL)" >> "$GITHUB_WORKSPACE/build_summary.md"
- cd "$GITHUB_WORKSPACE"
- else
- echo "- **Baseband-guard**: not present" >> build_summary.md
- fi
-
- # Get SUSFS4KSU commit
- if [ -d "$GITHUB_WORKSPACE/susfs4ksu" ]; then
- cd "$GITHUB_WORKSPACE/susfs4ksu"
- SUSFS_COMMIT=$(git rev-parse HEAD)
- SUSFS_URL="https://gitlab.com/simonpunk/susfs4ksu/-/commit/$SUSFS_COMMIT"
- echo "- **SUSFS4KSU (v1.5.12)**: [$SUSFS_COMMIT]($SUSFS_URL)" >> "$GITHUB_WORKSPACE/build_summary.md"
- cd "$GITHUB_WORKSPACE"
- else
- echo "- **SUSFS4KSU (v1.5.12)**: not present" >> build_summary.md
- fi
- echo "" >> build_summary.md
-
- # Add artifact summary with presence verification
- echo "## Build Artifacts" >> build_summary.md
- # Verify AnyKernel3 contents - check if kernel Image was actually copied (indicates successful build)
- if [ -d "AnyKernel3" ] && [ -f "AnyKernel3/Image" ]; then
- AK3_STATUS="✅"
- else
- AK3_STATUS="❌"
- fi
- echo "- **AnyKernel3**: $AK3_STATUS ${{ env.FILE_NAME }}-AnyKernel3" >> build_summary.md
- echo "### Misc (uploaded files)" >> build_summary.md
- FILES_PRESENT=0
- for f in "${{ env.FILE_NAME }}-Image" "${{ env.FILE_NAME }}-Image.gz" "${{ env.FILE_NAME }}-Image.lz4" "${{ env.FILE_NAME }}-boot.img" "${{ env.FILE_NAME }}-boot-gz.img" "${{ env.FILE_NAME }}-boot-lz4.img"; do
- if [ -f "$f" ]; then FILES_PRESENT=$((FILES_PRESENT+1)); fi
- done
- if [ "$FILES_PRESENT" -gt 0 ]; then
- MISC_STATUS="✅"
- else
- MISC_STATUS="❌"
- fi
- echo "- **Set**: $MISC_STATUS ${{ env.FILE_NAME }}-Misc" >> build_summary.md
- if [ "$MISC_STATUS" = "✅" ]; then
- echo " Included:" >> build_summary.md
- for f in "${{ env.FILE_NAME }}-Image" "${{ env.FILE_NAME }}-Image.gz" "${{ env.FILE_NAME }}-Image.lz4" "${{ env.FILE_NAME }}-boot.img" "${{ env.FILE_NAME }}-boot-gz.img" "${{ env.FILE_NAME }}-boot-lz4.img"; do
- if [ -f "$f" ]; then
- echo " - $f" >> build_summary.md
- fi
- done
- fi
- echo "### Diagnostics" >> build_summary.md
- echo "- **Rejected Patches**: ${{ env.FILE_NAME }}-Rejected-Patches" >> build_summary.md
- if [ -f patch-rejects/index.txt ]; then
- if [ -s patch-rejects/index.txt ]; then
- echo " Rejected files:" >> build_summary.md
- while IFS= read -r line; do
- echo " - $line" >> build_summary.md
- done < patch-rejects/index.txt
- else
- echo " Rejected file list is empty." >> build_summary.md
- fi
- else
- echo " No rejected patches found." >> build_summary.md
- fi
|