75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
name: Build LKM for KernelSU
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
upload:
|
|
required: true
|
|
type: boolean
|
|
default: true
|
|
description: "Whether to upload to branch"
|
|
secrets:
|
|
# username:github_pat
|
|
TOKEN:
|
|
required: true
|
|
workflow_dispatch:
|
|
inputs:
|
|
upload:
|
|
required: true
|
|
type: boolean
|
|
default: true
|
|
description: "Whether to upload to branch"
|
|
jobs:
|
|
build-lkm:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- version: "android12-5.10"
|
|
sub_level: 240
|
|
os_patch_level: 2025-09
|
|
- version: "android13-5.10"
|
|
sub_level: 238
|
|
os_patch_level: 2025-07
|
|
- version: "android13-5.15"
|
|
sub_level: 189
|
|
os_patch_level: 2025-09
|
|
- version: "android14-5.15"
|
|
sub_level: 185
|
|
os_patch_level: 2025-07
|
|
- version: "android14-6.1"
|
|
sub_level: 145
|
|
os_patch_level: 2025-09
|
|
- version: "android15-6.6"
|
|
sub_level: 98
|
|
os_patch_level: 2025-09
|
|
# uses: ./.github/workflows/gki-kernel-mock.yml when debugging
|
|
uses: ./.github/workflows/gki-kernel.yml
|
|
with:
|
|
version: ${{ matrix.version }}
|
|
version_name: ${{ matrix.version }}.${{ matrix.sub_level }}
|
|
tag: ${{ matrix.version }}-${{ matrix.os_patch_level }}
|
|
os_patch_level: ${{ matrix.os_patch_level }}
|
|
build_lkm: true
|
|
|
|
push-to-branch:
|
|
needs: [build-lkm]
|
|
runs-on: ubuntu-latest
|
|
if: ${{ inputs.upload }}
|
|
steps:
|
|
- name: Download all workflow run artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: bin/
|
|
merge-multiple: true
|
|
- name: Push to branch LKM
|
|
run: |
|
|
cd bin
|
|
git config --global init.defaultBranch lkm
|
|
git init
|
|
git remote add origin https://${{ secrets.TOKEN }}@github.com/${{ github.repository }}
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
find . -type f
|
|
git add .
|
|
git commit -m "Upload LKM from ${{ github.sha }}" -m "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
git push --force --set-upstream origin lkm
|