update #724
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 | |
on: | |
schedule: | |
- cron: '30 3/12 * * *' #每日更新 | |
watch: | |
types: [started] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
rss-make: | |
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 #安装依赖permissions: | |
- name: 'Working' | |
run: | |
python main.py #运行主程序 | |
- name: Commit files | |
continue-on-error: True | |
run: | | |
git config --local user.email "dr_hamilton@foxmail.com" | |
git config --local user.name "Ravello-H" | |
git add -A | |
git commit -m "`date '+%Y-%m-%d %H:%M:%S'`" | |
git status | |
git push -f origin main | |
git status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |