Files
wd210010-only_for_happly/.github/workflows/python-app.yml
T
2025-02-19 10:27:37 +08:00

41 lines
917 B
YAML

name: Update Date
on:
schedule:
- cron: '0 0,8,12,16 * * *'
push:
branches:
- main
jobs:
update-date:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run the update script
run: |
python update_date.py
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add date_config.json
git commit -m "Update date to $(date +'%Y-%m-%d')"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}