Auto Download schedules #134
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: Auto Download schedules | |
on: | |
push: | |
workflow_dispatch: | |
branches: | |
- main | |
schedule: | |
- cron: "0 12 * * *" # 半天更新一次 | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: Install Pypi Packages | |
run: pip install -r requirements.txt | |
- name: Run Python Scripts | |
run: python download.py | |
- name: Push change | |
run: | | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config user.name "github-actions[bot]" | |
status=$(git status -s) | |
if [[ -z "${status}" ]]; then | |
exit 0 | |
fi | |
git add . | |
git commit -m "[bot] Update Images" | |
git push |