-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: Rework workflow, add KernelSU tag check CI
- Loading branch information
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/test_build.yml → .github/workflows/build_kernel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Test buildable kernel | ||
name: Test build kernel | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Check KernelSU tag update | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 15,30 * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Check update | ||
run: | | ||
bash scripts/check-kernelsu-update.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,3 +141,4 @@ kernel/configs/android-*.cfg | |
# | ||
Android.bp | ||
local.config | ||
!.github/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git submodule update --init | ||
pushd KernelSU | ||
LOCAL_LATEST=$(git describe --tags) | ||
git pull origin main | ||
REMOTE_LATEST=$(git describe --tags) | ||
if [ $LOCAL_LATEST = $REMOTE_LATEST ]; then | ||
echo "No changes: Local tag $LOCAL_LATEST is latest" | ||
exit 0; | ||
fi | ||
git checkout $REMOTE_LATEST | ||
popd | ||
git add KernelSU | ||
git commit -m "KernelSU: Update release tag to $REMOTE_LATEST" -m "Update the tag from $LOCAL_LATEST to $REMOTE_LATEST" | ||
git push |