AutoPull #2075
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
name: AutoPull | |
on: | |
schedule: | |
- cron: "0 */8 * * *" | |
workflow_dispatch: | |
jobs: | |
pull: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT }} | |
- name: timezone | |
run: sudo timedatectl set-timezone 'Asia/Shanghai' | |
- name: Sync upstream updates | |
run: | | |
git config pull.rebase false | |
git config --global user.name 'AutoPull' | |
git config --global user.email '[email protected]' | |
export oldver=$(git rev-parse --short HEAD) | |
git pull https://github.com/LSPosed/LSPosed | |
if [ $(git rev-parse --short HEAD) != $oldver ]; then | |
git commit --amend --no-edit -m "Auto Merge $(date '+%Y-%m-%d %H:%M:%S')" | |
git push origin LSPosed | |
fi |