Automatic Commit #1164
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: Automatic Commit | |
on: | |
# push推送时触发 | |
push: | |
# 定时任务触发 | |
schedule: | |
# 每天北京时间1点运行 | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install | |
run: pip install requests wget | |
- name: Update | |
run: python ./scripts/tools/adblock.py | |
- name: Commit | |
env: | |
TZ: Asia/Shanghai | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add -A | |
git commit -m \ | |
":pencil: Update at \ | |
$(date +"%Y-%m-%d %H:%M") \ | |
" | |
- name: Push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PRIVATE_TOKEN }} |