Skip to content

Update Data

Update Data #691

Workflow file for this run

name: Update Data
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
download-geojson:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/[email protected]
- name: pull changes from remote
run: git pull origin
- name: setup python
uses: actions/[email protected]
with:
python-version: '3.12'
- name: install mudules
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute python script
run: python scripts/download-geojson.py
- name: commit and push files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "[update] Update GeoJSON data" --allow-empty)
git push
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
unify-data:
runs-on: ubuntu-latest
needs: download-geojson
if: success()
steps:
- name: checkout repo content
uses: actions/[email protected]
- name: pull changes from remote
run: git pull origin
- name: setup python
uses: actions/[email protected]
with:
python-version: '3.12'
- name: install mudules
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute python script
run: python scripts/unify-data.py
- name: commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add deepstate-map-data.geojson.gz
git diff-index --quiet HEAD || (git commit -m "[update] Update GeoJSON data - $(date +'%Y-%m-%d')" --allow-empty)
git push
env:
github_token: ${{ secrets.GITHUB_TOKEN }}