name: Update Data
on:
schedule:
- cron: '7 4,7,10,13,16 * * *'
jobs:
update:
name: Update data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
show-progress: true
- name: Update data
run: |
curl --silent --header "Authorization: Bearer ${PLUGO_TOKEN}" --output _data/plugo.json \
'https://prod.plugo.io/api/v2/goblin/stores?lat=18.46448805396234&lng=72.12753139436244&radius=90999999'
jq ".|length" _data/plugo.json
export VERSION=`date +%Y.%-m.%-d`
sed -i "s/^version.*/version: $(VERSION)/" CITATION.cff
sed -i "s/^date-released.*/date-released: `date --rfc-3339=date`/" CITATION.cff
pip install msgspec pygit2
python count.py
python dead-locations.py
env:
PLUGO_TOKEN: ${{ secrets.token }}
- uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Update Plugo Data
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'