Sky task every day update #5630
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: Sky task every day update | |
on: | |
schedule: | |
- cron: '10,20,30,40 23,16,5 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
TZ: Asia/Shanghai | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: import py 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10.16 | |
- name: install python module | |
run: pip3 install -r requirements.txt | |
- name: run python script | |
run: | |
python3 main.py | |
- name: commit github | |
run: | | |
git config --global user.email [email protected] | |
git config --global user.name GitHub Action | |
git add . | |
time=$(date "+%Y-%m-%d %H:%M:%S") | |
git commit -m "${time} 自动更新" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |