| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # .github/actions/set-kernel-config/action.yml
- name: Set Kernel Config
- description: Applies kernel config values directly using scripts/config (NO fragments)
- runs:
- using: composite
- steps:
- - name: Apply configs
- shell: bash
- working-directory: ${{ github.workspace }}/kernel/common
- run: |
- set -euo pipefail
- make O=/home/runner/out gki_defconfig AARCH=arm64
- CONFIG_FILE="/home/runner/out/.config"
- CONFIG_LIST="${{ github.workspace }}/wild_gki.fragment"
- if [ ! -f scripts/config ]; then
- echo "ERROR: common/scripts/config not found"
- exit 1
- fi
- if [ ! -f "$CONFIG_FILE" ]; then
- echo "ERROR: config file not found: $CONFIG_FILE"
- exit 1
- fi
- if [ ! -f "$CONFIG_LIST" ]; then
- echo "ERROR: config list file not found: $CONFIG_LIST"
- exit 1
- fi
- apply_config() {
- local input="$1"
- # trim whitespace
- input="$(echo "$input" | xargs)"
- # skip empty lines and comments
- [[ -z "$input" || "$input" == \#* ]] && return
- if [[ "$input" == *"="* ]]; then
- local config="${input%%=*}"
- local value="${input#*=}"
- else
- local config="$input"
- local value="y"
- fi
- echo "Setting: $config=$value"
- case "$value" in
- y|Y|yes|YES|1|true|TRUE)
- scripts/config --file "$CONFIG_FILE" -e "$config"
- ;;
- n|N|no|NO|0|false|FALSE)
- scripts/config --file "$CONFIG_FILE" -d "$config"
- ;;
- *)
- scripts/config --file "$CONFIG_FILE" --set-val "$config" "$value"
- ;;
- esac
- }
- while IFS= read -r line || [ -n "$line" ]; do
- apply_config "$line"
- done < "$CONFIG_LIST"
|