Fetch data #1306
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: Fetch data | |
on: | |
schedule: | |
- cron: '30 6 * * *' | |
workflow_dispatch: | |
jobs: | |
fetch-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r bin/data/requirements.txt | |
- name: Run fetch data scripts | |
run: | | |
python bin/data/fetch-global-data.py | |
- name: Push changes | |
run: | | |
git config --local user.name "github-actions-bot" | |
git config --local user.email "github-actions-bot-noreply@noreply" | |
touch datalog | |
echo $(date +"%d %b %Y %H-%M %Z") > datalog | |
git add . | |
git commit -m "Data update" | |
git push |