| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- name: 'Setup SUSFS Branch'
- description: 'Clone SUSFS repo and cherry-pick commits'
- inputs:
- susfs_commit:
- description: 'SUSFS commit hash (empty = latest on auto-derived gki-{version} branch)'
- required: false
- default: ""
- version:
- description: 'Kernel config version (e.g., android15-6.6)'
- required: true
- runs:
- using: "composite"
- steps:
- - name: Clone SUSFS Branch
- shell: bash
- run: |
- set -euo pipefail
- # Retry transient network errors (up to 5 attempts, 5s backoff).
- retry() {
- local n=0
- until [ "$n" -ge 5 ]; do
- "$@" && return 0
- n=$((n+1))
- echo "retry $n/5 failed for: $*" >&2
- sleep 5
- done
- return 1
- }
- SUSFS_BRANCH="gki-${{ inputs.version }}"
- SUSFS_REPO="https://gitlab.com/simonpunk/susfs4ksu.git"
- echo "Preparing SUSFS for branch: $SUSFS_BRANCH"
- echo "Cloning latest from $SUSFS_BRANCH..."
- retry git clone "$SUSFS_REPO" -b "$SUSFS_BRANCH" susfs4ksu
- if [ -n "${{ inputs.susfs_commit }}" ]; then
- echo "Checking out SUSFS commit: ${{ inputs.susfs_commit }}"
- cd ${{ github.workspace }}/susfs4ksu
- retry git checkout "${{ inputs.susfs_commit }}"
- fi
- cd susfs4ksu
- patch -p1 < "${{ github.workspace }}/kernel_patches/pershoot/susfs4ksu/0001-pershoot-Allow-core-to-be-built-with-no-features.patch"
- patch -p1 < "${{ github.workspace }}/kernel_patches/pershoot/susfs4ksu/0002-pershoot-Implement-SuSFS-and-Toolkit-coexistence.patch"
|