Daily update data #544
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: Daily update data | |
on: | |
schedule: | |
- cron: '0 14 * * *' | |
jobs: | |
update-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
cache-dependency-path: '.github/env/requirements.txt' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -qq | |
python -m pip install --upgrade pip | |
pip install -r .github/env/requirements.txt | |
- name: Update cases | |
run: | | |
python .github/scripts/update_cases.py | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v13 | |
id: verify-changed-files | |
with: | |
files: | | |
MPX_cases.csv | |
- name: Commit changed files | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
git config --global user.name 'watronfire' | |
git config --global user.email 'snowboardman007@gmail.com' | |
git commit -am "Automated update of cases on $(date +'%Y-%m-%d')" | |
git push |