Skip to content

Update datasets

Update datasets #161

Workflow file for this run

name: 'Update datasets'
on:
workflow_dispatch:
schedule:
# Dataset will be updated every Sunday at 2 AM UTC
- cron: '0 2 * * 0'
jobs:
update:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@main
- name: Install poetry
run: pipx install poetry
- name: Set up Python and cache poetry dependencies
uses: actions/setup-python@v4
with:
python-version: 3.10.8
cache: poetry
- name: Install dependencies
run: poetry install --no-root
- name: Fetch all datasets
# Load github secrets stored variables into environment
env:
USER_FULL_NAME: ${{ secrets.USER_FULL_NAME}}
USER_ORGANIZATION: ${{ secrets.USER_ORGANIZATION}}
USER_EMAIL: ${{ secrets.USER_EMAIL}}
run: |
poetry run python japan_aqi.py
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add data/japan-aqi/*
git commit --allow-empty -m "Auto-update of AQI data" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}