Skip to content

Daily Homicide Data Sync #1708

Daily Homicide Data Sync

Daily Homicide Data Sync #1708

name: Daily Homicide Data Sync
on:
schedule:
- cron: "15 15 * * 1-5"
- cron: "15 17 * * 1-5"
push:
paths:
- .github/workflows/daily-homicide-sync.yml
jobs:
daily-sync-homicides:
name: Daily Homicides Data Sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: "1.4.2"
- name: Install dependencies
run: sudo apt-get install -y libspatialindex-dev
- name: Run update
run: |
poetry install
git pull origin master
poetry run gv-dashboard-data daily-update --homicides-only
- name: Commit files
continue-on-error: true
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -a -m "Add daily download changes"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}