Skip to content

KernelSU PR Update

KernelSU PR Update #1

Workflow file for this run

name: KernelSU PR Update
on:
schedule:
- cron: '0 0 1 */2 *' # Run at 00:00 on the 1st day of every 2nd month
workflow_dispatch: # Allow manual triggering
jobs:
update-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout main repository
uses: actions/checkout@v4
- name: Clone KernelSU repository
run: |
git clone https://github.com/tiann/KernelSU.git kernelsu_temp
- name: Check for changes and copy files
run: |
if [[ -d kernelsu_temp/kernel && "$(ls -A kernelsu_temp/kernel)" ]]; then
mkdir -p KernelSU/kernel
cp -R kernelsu_temp/kernel/* KernelSU/kernel/
if [[ -n $(git status -s) ]]; then
echo "CHANGES_MADE=true" >> $GITHUB_ENV
else
echo "No changes detected in KernelSU kernel files."
echo "CHANGES_MADE=false" >> $GITHUB_ENV
fi
else
echo "KernelSU kernel directory is empty or doesn't exist."
echo "CHANGES_MADE=false" >> $GITHUB_ENV
fi
- name: Create Pull Request
if: env.CHANGES_MADE == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update KernelSU kernel files
title: Update KernelSU kernel files - ${{ github.run_number }}
body: |
This is an automated PR to update KernelSU kernel files.
Changes made in this pull request:
- Updated KernelSU kernel files from the upstream repository
branch: kernelsu-update
delete-branch: true
base: main