name: 'Apply Kernel Branding & Timestamp' description: 'Apply kernel branding to kernel version string' inputs: variant: description: 'Variant of kernel to apply branding to' required: true kernel_version: description: 'Kernel version (e.g., 6.1)' required: true android_version: description: 'Android version (e.g., android14)' required: true version: description: 'Combined version (e.g., android14-6.1)' required: true sublevel: description: 'Sublevel of kernel version (e.g., 1)' required: true brand_name: description: 'Branding text appended to the version (e.g., Wild)' required: false default: Wild runs: using: "composite" steps: - name: Apply Kernel Name Branding shell: bash working-directory: ${{ github.workspace }}/kernel/common run: | VERSION="${{ inputs.version }}" ANDROID_PART=$(echo "$VERSION" | cut -d- -f1) KERNEL_PART=$(echo "$VERSION" | cut -d- -f2) BRAND="${{ inputs.brand_name }}" if [[ ${{ inputs.version }} == "android15-6.6" || ${{ inputs.version }} == "android16-6.12" ]]; then KERNEL_STRING="$KERNEL_PART.${{ inputs.sublevel }}-$ANDROID_PART" sed -i '$d' scripts/setlocalversion && echo "echo \"$KERNEL_STRING-$BRAND\"" >> scripts/setlocalversion else sed -i '$d' scripts/setlocalversion && echo "echo \"-$ANDROID_PART-$BRAND\"" >> scripts/setlocalversion fi chmod +x scripts/setlocalversion