Update CSVs #1151
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: Update CSVs | |
on: | |
workflow_dispatch: # Allow manual triggering | |
schedule: | |
- cron: "*/5 * * * *" # Run every 5 minutes | |
jobs: | |
update-csvs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
cache: 'pip' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run fetch script | |
run: python fetch.py | |
- name: Commit | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add *.csv | |
git commit -m "Update CSV files" || echo "No change" | |
git push |