Update GeoJSON Data #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update GeoJSON Data | |
| on: | |
| schedule: | |
| # Run at 04:00 UTC daily | |
| - cron: '0 4 * * *' | |
| workflow_dispatch: # Allow manual trigger from Actions tab | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Fetch and convert data | |
| run: python3 fetch.py | |
| env: | |
| TAP_IN_OSM_DROP_THRESHOLD: ${{ vars.DROP_THRESHOLD || '50' }} | |
| TAP_IN_OSM_MAX_DATA_LAG_HOURS: ${{ vars.MAX_DATA_LAG_HOURS || '48' }} | |
| - name: Commit and push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data.geojson | |
| git diff --staged --quiet && echo "No changes to commit." || (git commit -m "Update data.geojson" && git push) |