| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- 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 }}"
- retry git -C "${{ github.workspace }}/susfs4ksu" checkout "${{ inputs.susfs_commit }}"
- fi
- cd "${{ github.workspace }}/susfs4ksu"
- SUSFS_COMMIT="$(git rev-parse HEAD)"
- echo "SUSFS_COMMIT=$SUSFS_COMMIT" >> "$GITHUB_ENV"
- echo "Using SUSFS commit: $SUSFS_COMMIT"
- 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"
|