update-bing-walpaper #891
This file contains hidden or 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-bing-walpaper | |
| on: | |
| schedule: | |
| - cron: '0 1 * * *' | |
| push: | |
| branches: [ master ] | |
| env: | |
| TZ: Asia/Shanghai | |
| jobs: | |
| push-bing: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| cache: 'pip' # caching pip dependencies | |
| python-version: 3.9 | |
| - name: pip install | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Download | |
| run: | | |
| echo $(date "+%Y-%m-%d %H:%M:%S") > update_time.txt | |
| python main.py | |
| - name: Cmmit files | |
| run: | | |
| git config --global user.email github-actions | |
| git config --global user.name [email protected] | |
| git add -A | |
| git commit --allow-empty -m "`date "+%B %d, %Y🎉"`" | |
| git push origin master |