Repository navigation
Refresh routes #28
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: Refresh routes | |
| # Builds routes.json (every bus and tram line's street shapes and stops) from ZTM's GTFS and | |
| # uploads it to the tabor-live Worker, where phones fetch it once a day for HUNT's future | |
| # trails. ZTM republishes the GTFS around 07:50 Warsaw time, with that day's detours. | |
| # gtfs.ztm.waw.pl doesn't answer GitHub's runners (the connection times out, 2026-09-28), so | |
| # the zip comes through the Worker, which it does answer. | |
| on: | |
| schedule: | |
| - cron: "30 6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: routes-refresh | |
| cancel-in-progress: false | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Build routes.json from the GTFS | |
| env: | |
| GTFS_URL: https://taborapi.thefilip.com/v1/gtfs | |
| ROUTES_UPLOAD_TOKEN: ${{ secrets.ROUTES_UPLOAD_TOKEN }} | |
| run: python3 scripts/build_routes.py | |
| - name: Upload to the Worker | |
| env: | |
| ROUTES_UPLOAD_TOKEN: ${{ secrets.ROUTES_UPLOAD_TOKEN }} | |
| run: scripts/upload_routes.sh |