Update Rules #620
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: Update Rules | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */12 * * *' | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rules | |
continue-on-error: true | |
run: | | |
bash ./data/script/update-rules.sh | |
- name: Update ReadMe | |
run: | | |
bash ./data/script/clean-readme.sh | |
- name: Git push assets to Github | |
run: | | |
git init | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git branch -m master | |
git add --all | |
git commit -m "Updated at $(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')(北京时间)" | |
git push -u origin -f | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@main | |
with: | |
token: ${{ secrets.TOKENS }} | |
repository: ${{ github.repository }} | |
retain_days: 0 | |
keep_minimum_runs: 0 |