Update Station Data #63
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 Station Data | |
| on: | |
| schedule: | |
| # Run daily at 3:00 AM UTC | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update-data: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "latest" | |
| - name: Fetch station abbreviations | |
| uses: nick-fields/retry@v3 | |
| with: | |
| timeout_minutes: 5 | |
| max_attempts: 3 | |
| retry_wait_seconds: 30 | |
| command: uv run scripts/fetch_abbreviations.py | |
| - name: Fetch current station data | |
| uses: nick-fields/retry@v3 | |
| with: | |
| timeout_minutes: 5 | |
| max_attempts: 3 | |
| retry_wait_seconds: 30 | |
| command: uv run scripts/fetch_stations.py | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| git add data/* | |
| git diff --staged --quiet || echo "changes=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push changes | |
| if: steps.check_changes.outputs.changes == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git commit -m "Update station data [automated] | |
| - Updated station abbreviations from DVB PDF | |
| - Fetched current station data from VVO open data API | |
| - Generated station summary statistics" | |
| git push |