Get kernel format #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Get kernel format | |
on: | |
workflow_dispatch: # Allow manual triggering of the workflow | |
inputs: | |
boot_img_url: | |
description: "URL to download the boot.img file" | |
required: true | |
type: string | |
#default: "https://filebin.net/gp05fto9lulm3qwg/boot.img" # Default URL if not provided | |
jobs: | |
process-boot-img: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# Step 2: Download boot.img from the provided URL | |
- name: Download boot.img | |
run: | | |
curl -L -o boot.img "${{ github.event.inputs.boot_img_url }}" | |
if [ ! -f "boot.img" ]; then | |
echo "Failed to download boot.img. Exiting." | |
exit 1 | |
fi | |
# Step 3: Ensure magiskboot is executable and process boot.img | |
- name: Process boot.img | |
continue-on-error: true | |
run: | | |
# Ensure magiskboot is executable | |
chmod +x magiskboot | |
./magiskboot unpack boot.img | |
#KERNEL_FMT=$(./magiskboot unpack boot.img 2>&1 | grep 'KERNEL_FMT' | cut -f2 -d '[]') | |
#if echo "$KERNEL_FMT" | grep -qi 'gzip'; then | |
#echo "Your kernel format is GZIP (gz)" | |
#elif echo "$KERNEL_FMT" | grep -qi 'lz4'; then | |
#echo "Your kernel format is LZ4 (lz4)" | |
#elif echo "$KERNEL_FMT" | grep -qi 'raw'; then | |
#echo "Your kernel format is raw" | |
#fi |