Skip to content

Check KernelSU tag update #1

Check KernelSU tag update

Check KernelSU tag update #1

Workflow file for this run

name: Check KernelSU tag update
on:
schedule:
- cron: '0 12 15,30 * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Check update
run: |
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-Next
LOCAL_LATEST=$(git describe --tags --abbrev=0)
git pull origin main
REMOTE_LATEST=$(git describe --tags --abbrev=0)
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-Next
git commit -m "KSU-N: update tag $REMOTE_LATEST" -m
git push