Bing壁纸 - 每日爬取 #136
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: Bing壁纸 - 每日爬取 | |
on: | |
schedule: | |
# 定时执行,会有延时 | |
- cron: 0 1 * * * | |
workflow_dispatch: # 手动触发 | |
#https://github.com/rskil/Bing-wallpaper | |
env: | |
TZ: Asia/Shanghai | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 运行脚本 | |
run: | | |
python3 image-bing.py | |
- name: 推送到仓库 | |
env: | |
NAME: ${{ secrets.NAME }} | |
EMAIL: ${{ secrets.EMAIL }} | |
TOKEN: ${{ secrets.TOKEN }} | |
run: | | |
git config --global user.email $EMAIL | |
git config --global user.name $NAME | |
git remote set-url origin https://[email protected]/${{ github.repository }}.git | |
git add ./* | |
git commit -m "Update on $(date +%F' '%X)" -a | |
git push origin master | |
echo 'Happy every day!' |