ci: push to telegram (#43)

* ci: push to telegram

* support topic

* check BOT_TOKEN in build-su

* update script
This commit is contained in:
Ylarod
2023-01-11 22:47:31 +08:00
committed by GitHub
parent 4f9feeff19
commit e37d97c7c7
4 changed files with 131 additions and 5 deletions

View File

@@ -54,4 +54,21 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: kernel-aarch64-${{ matrix.version }}-boot.img
path: android-kernel/out/*/dist/boot.img
path: android-kernel/out/*/dist/boot.img
- name: Upload to telegram
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CACHE_CHAT_ID: ${{ secrets.CACHE_CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
run: |
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
OUTDIR=android-kernel/out/android13-5.15/dist
BOOT=kernel-aarch64-${{ matrix.version }}-boot.img.zip
zip $BOOT -j -r $OUTDIR/boot.img
pip3 install python-telegram-bot
python3 $GITHUB_WORKSPACE/KernelSU/scripts/ksubot.py $BOOT
fi