Skip to content

update_snapshot

update_snapshot #3

name: Update Public Data Snapshot
on:
repository_dispatch:
types: [update_snapshot]
jobs:
update-snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install supabase
- name: Update snapshot
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
run: |
python scripts/update_snapshot.py
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add public_data/snapshots/latest
git commit -m "Update public data snapshot" || exit 0
git push