| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- name: 'Download Kernel Repository'
- description: 'Initialize and sync Android kernel source repository'
- inputs:
- android_version:
- description: 'Android version (e.g., android14)'
- required: true
- kernel_version:
- description: 'Kernel version (e.g., 5.15, 6.1)'
- required: true
- os_patch_level:
- description: 'OS patch level (e.g., 2024-01)'
- required: true
- outputs:
- deprecated_branch:
- description: 'Whether the branch is deprecated'
- value: ${{ steps.sync.outputs.deprecated }}
- runs:
- using: composite
- steps:
- # - name: Initialize and Sync Kernel Repository
- # id: sync
- # shell: bash
- # working-directory: ${{ github.workspace }}/kernel
- # run: |
- # FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
- #
- # repo init -u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --depth=1 --partial-clone --clone-filter=blob:limit=10M
- #
- # REMOTE_BRANCH=$(git ls-remote https://android.googlesource.com/kernel/common ${FORMATTED_BRANCH})
- # DEFAULT_MANIFEST_PATH=.repo/manifests/default.xml
- # DEPRECATED=false
- #
- # if grep -q deprecated <<< $REMOTE_BRANCH; then
- # sed -i "s/\"${FORMATTED_BRANCH}\"/\"deprecated\/${FORMATTED_BRANCH}\"/g" $DEFAULT_MANIFEST_PATH
- # echo "⚠ Note: Branch ${FORMATTED_BRANCH} is considered deprecated."
- # DEPRECATED=true
- # fi
- #
- # echo "deprecated=$DEPRECATED" >> $GITHUB_OUTPUT
- #
- # repo sync -c -j$(nproc --all) --fail-fast --no-tags --force-sync --no-clone-bundle
- - name: Ensure Kernel Directory
- shell: bash
- run: |
- mkdir -p "${{ github.workspace }}/kernel"
- - name: Download Kernel Repository (Manifest Archives)
- id: sync
- shell: bash
- working-directory: ${{ github.workspace }}/kernel
- env:
- PYTHONUNBUFFERED: "1"
- GITHUB_TOKEN: ${{ github.token }}
- run: |
- python3 "${{ github.action_path }}/download_kernel_archives.py" --android-version "${{ inputs.android_version }}" --kernel-version "${{ inputs.kernel_version }}" --os-patch-level "${{ inputs.os_patch_level }}"
|