|
|
@@ -44,10 +44,16 @@ on:
|
|
|
- NONE
|
|
|
- FULL
|
|
|
default: FULL
|
|
|
- use_latest_commits:
|
|
|
- description: "Use branch tip for KernelSU and SUSFS instead of pinned commits"
|
|
|
- type: boolean
|
|
|
- default: true
|
|
|
+ ksu_branch:
|
|
|
+ description: "KernelSU branch or commit (empty = latest dev branch tip)"
|
|
|
+ type: string
|
|
|
+ required: false
|
|
|
+ default: ""
|
|
|
+ susfs_commit:
|
|
|
+ description: "SUSFS commit hash (empty = latest on auto-derived gki-{version} branch)"
|
|
|
+ type: string
|
|
|
+ required: false
|
|
|
+ default: ""
|
|
|
test_release_notes:
|
|
|
description: "Test release notes only"
|
|
|
type: boolean
|
|
|
@@ -60,7 +66,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android12-5.10.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
build-android13-5-10:
|
|
|
@@ -69,7 +76,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android13-5.10.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
build-android13-5-15:
|
|
|
@@ -78,7 +86,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android13-5.15.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
build-android14-5-15:
|
|
|
@@ -87,7 +96,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android14-5.15.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
build-android14-6-1:
|
|
|
@@ -96,7 +106,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android14-6.1.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
build-android15-6-6:
|
|
|
@@ -105,7 +116,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android15-6.6.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
build-android16-6-12:
|
|
|
@@ -114,7 +126,8 @@ jobs:
|
|
|
with:
|
|
|
config_file: .github/config/android16-6.12.json
|
|
|
feature_set: ${{ inputs.feature_set || 'FULL' }}
|
|
|
- use_latest_commits: ${{ inputs.use_latest_commits }}
|
|
|
+ ksu_branch: ${{ inputs.ksu_branch }}
|
|
|
+ susfs_commit: ${{ inputs.susfs_commit }}
|
|
|
secrets: inherit
|
|
|
|
|
|
rej:
|
|
|
@@ -232,7 +245,8 @@ jobs:
|
|
|
echo "# 📋 Workflow Build Summary"
|
|
|
echo
|
|
|
echo "**Feature Set:** ${{ inputs.feature_set }}"
|
|
|
- echo "**Use Latest Commits:** ${{ inputs.use_latest_commits }}"
|
|
|
+ echo "**KSU Branch:** ${{ inputs.ksu_branch || 'latest dev' }}"
|
|
|
+ echo "**SUSFS Commit:** ${{ inputs.susfs_commit || 'latest' }}"
|
|
|
echo
|
|
|
echo "---"
|
|
|
echo
|
|
|
@@ -259,37 +273,33 @@ jobs:
|
|
|
env:
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
RELEASE_NOTES: .github/config/RELEASE_NOTES.md
|
|
|
- COMMITS_JSON: .github/config/commits.json
|
|
|
steps:
|
|
|
- name: Checkout code
|
|
|
uses: actions/checkout@v5
|
|
|
|
|
|
- name: Extract KernelSU Version Info
|
|
|
id: ksu_version
|
|
|
- env:
|
|
|
- COMMITS_JSON_PATH: ${{ env.COMMITS_JSON }}
|
|
|
run: |
|
|
|
set -euo pipefail
|
|
|
|
|
|
- KSUN_BRANCH="dev"
|
|
|
-
|
|
|
- if [ "${{ inputs.use_latest_commits }}" = "true" ]; then
|
|
|
- echo "Cloning KernelSU-Next from full branch tip: $KSUN_BRANCH"
|
|
|
- git clone --branch "$KSUN_BRANCH" https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
- else
|
|
|
- echo "Cloning KernelSU-Next from branch: $KSUN_BRANCH"
|
|
|
- git clone --depth=1 --branch "$KSUN_BRANCH" https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
+ KSU_INPUT="${{ inputs.ksu_branch }}"
|
|
|
+ if [ -z "$KSU_INPUT" ]; then
|
|
|
+ KSU_INPUT="dev"
|
|
|
fi
|
|
|
|
|
|
- cd /tmp/kernelsu-next
|
|
|
-
|
|
|
- if [ "${{ inputs.use_latest_commits }}" = "true" ]; then
|
|
|
+ # Try as branch first, fall back to commit
|
|
|
+ if git ls-remote --heads https://github.com/KernelSU-Next/KernelSU-Next.git "$KSU_INPUT" | grep -q .; then
|
|
|
+ echo "Cloning KernelSU-Next from branch: $KSU_INPUT"
|
|
|
+ git clone --branch "$KSU_INPUT" https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
+ cd /tmp/kernelsu-next
|
|
|
KSUN_COMMIT=$(git rev-parse HEAD)
|
|
|
else
|
|
|
- KSUN_COMMIT=$(jq -er '.kernelsu.dev' "$COMMITS_JSON_PATH")
|
|
|
- echo "Checking out commit: $KSUN_COMMIT"
|
|
|
- git fetch --depth=50 origin "$KSUN_COMMIT"
|
|
|
- git checkout "$KSUN_COMMIT"
|
|
|
+ echo "Cloning KernelSU-Next from dev branch, then checking out commit: $KSU_INPUT"
|
|
|
+ git clone --branch dev https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
+ cd /tmp/kernelsu-next
|
|
|
+ git fetch --depth=50 origin "$KSU_INPUT"
|
|
|
+ git checkout "$KSU_INPUT"
|
|
|
+ KSUN_COMMIT="$KSU_INPUT"
|
|
|
fi
|
|
|
|
|
|
COMMITS_COUNT=$(git rev-list --count HEAD)
|
|
|
@@ -351,7 +361,6 @@ jobs:
|
|
|
env:
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
RELEASE_NOTES: .github/config/RELEASE_NOTES.md
|
|
|
- COMMITS_JSON: .github/config/commits.json
|
|
|
outputs:
|
|
|
new_tag: ${{ steps.tag.outputs.new_tag }}
|
|
|
steps:
|
|
|
@@ -452,31 +461,27 @@ jobs:
|
|
|
|
|
|
- name: Extract KernelSU Version Info
|
|
|
id: ksu_version
|
|
|
- env:
|
|
|
- COMMITS_JSON_PATH: ${{ env.COMMITS_JSON }}
|
|
|
run: |
|
|
|
set -euo pipefail
|
|
|
|
|
|
- KSUN_BRANCH="dev"
|
|
|
-
|
|
|
- if [ "${{ inputs.use_latest_commits }}" = "true" ]; then
|
|
|
- echo "Cloning KernelSU-Next from full branch tip: $KSUN_BRANCH"
|
|
|
- git clone --branch "$KSUN_BRANCH" https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
- else
|
|
|
- echo "Cloning KernelSU-Next from branch: $KSUN_BRANCH"
|
|
|
- git clone --depth=1 --branch "$KSUN_BRANCH" https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
+ KSU_INPUT="${{ inputs.ksu_branch }}"
|
|
|
+ if [ -z "$KSU_INPUT" ]; then
|
|
|
+ KSU_INPUT="dev"
|
|
|
fi
|
|
|
|
|
|
- cd /tmp/kernelsu-next
|
|
|
-
|
|
|
- if [ "${{ inputs.use_latest_commits }}" = "true" ]; then
|
|
|
+ # Try as branch first, fall back to commit
|
|
|
+ if git ls-remote --heads https://github.com/KernelSU-Next/KernelSU-Next.git "$KSU_INPUT" | grep -q .; then
|
|
|
+ echo "Cloning KernelSU-Next from branch: $KSU_INPUT"
|
|
|
+ git clone --branch "$KSU_INPUT" https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
+ cd /tmp/kernelsu-next
|
|
|
KSUN_COMMIT=$(git rev-parse HEAD)
|
|
|
else
|
|
|
- # Extract KernelSU commit and branch from commits config
|
|
|
- KSUN_COMMIT=$(jq -er '.kernelsu.dev' "$COMMITS_JSON_PATH")
|
|
|
- echo "Checking out commit: $KSUN_COMMIT"
|
|
|
- git fetch --depth=50 origin "$KSUN_COMMIT"
|
|
|
- git checkout "$KSUN_COMMIT"
|
|
|
+ echo "Cloning KernelSU-Next from dev branch, then checking out commit: $KSU_INPUT"
|
|
|
+ git clone --branch dev https://github.com/KernelSU-Next/KernelSU-Next.git /tmp/kernelsu-next
|
|
|
+ cd /tmp/kernelsu-next
|
|
|
+ git fetch --depth=50 origin "$KSU_INPUT"
|
|
|
+ git checkout "$KSU_INPUT"
|
|
|
+ KSUN_COMMIT="$KSU_INPUT"
|
|
|
fi
|
|
|
|
|
|
# Extract version info
|