Skip to content

Daily Shootings Data Sync #2526

Daily Shootings Data Sync

Daily Shootings Data Sync #2526

name: Daily Shootings Data Sync
on:
schedule:
- cron: "30 11 * * 1-5"
- cron: "30 15 * * 1-5"
- cron: "30 17 * * 1-5"
push:
paths:
- .github/workflows/daily-shootings-sync.yml
jobs:
daily-sync-shootings:
name: Daily Shootings 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: Download files
run: |
poetry install
git pull origin master
poetry run gv-dashboard-data daily-update --debug --shootings-only
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Commit files
continue-on-error: true
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f gun_violence_dashboard_data/data/**/*.json
git commit -a -m "Add daily download changes"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}