Skip to content

Update Station Data #74

Update Station Data

Update Station Data #74

Workflow file for this run

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