misc: create generate.yml

This commit is contained in:
KOWX712
2025-04-27 21:59:41 +08:00
parent 7fbfaf60f4
commit 1818b2be4e
2 changed files with 36 additions and 0 deletions

35
.github/workflows/generate.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: generate
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: 'bot'
- name: Generate and encode
run: |
curl -Ls https://raw.githubusercontent.com/KOWX712/keyboxGenerator/main/keyboxGenerator_v2.0.py | python3
base64 -w 0 "keybox.xml" | xxd -p | tr -d '\n' > .device
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .device
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)
if [[ "$LAST_COMMIT_MSG" == "Update .device" ]]; then
git commit --amend --no-edit
git push --force
else
git commit -m "Update .device"
git push
fi

View File

@@ -40,6 +40,7 @@ Configure Tricky Store target.txt with KSU WebUI.
## Acknowledgement
- [j-hc/zygisk-detach](https://github.com/j-hc/zygisk-detach) - KSU WebUI template
- [markedjs/marked](https://github.com/markedjs/marked) - Markdown Support
- [TMLP-Team/keyboxGenerator](https://github.com/TMLP-Team/keyboxGenerator) - Unknown keybox.xml generator
## Links
[![release](https://custom-icon-badges.demolab.com/badge/-Download-F25278?style=for-the-badge&logo=download&logoColor=white)](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases)