Skip to content

update

update #1898

Workflow file for this run

name: update
on:
push:
branches: [ main ]
schedule:
- cron: '30 5/12 * * *' #每日更新
watch:
types: [started]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest #运行环境
steps:
- name: Checkout
uses: actions/checkout@v3
- name: 'Git set'
run: |
git init
git pull
- name: 'Set up Python'
uses: actions/setup-python@v4
with:
python-version: 3.7 #v3
- name: 'Install requirements'
run: |
pip install wget
pip install bs4
pip install urllib3 #安装依赖
- name: 'Working'
run:
python main.py #运行主程序
- name: Record time
run: echo `date` > date.log
- name: Commit files
run: |
tree -a
git diff
git config --local user.email "[email protected]"
git config --local user.name "Ravello-H"
git add -A
git commit -m "`date '+%Y-%m-%d %H:%M:%S'`" || exit #动态提交信息
git status
git push -f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}