Skip to content

Fetch data

Fetch data #5528

Workflow file for this run

name: Fetch data
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
jobs:
fetch-data:
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
contents: write
strategy:
fail-fast: true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup-python-poetry
with:
python-version: 3.11.4
poetry-version: 1.8.2
path: kos-loader
- name: Fetch data
working-directory: kos-loader
shell: bash
env:
KOS_USERNAME: ${{ secrets.KOS_USERNAME }}
KOS_PASSWORD: ${{ secrets.KOS_PASSWORD }}
LOGLEVEL: info
run: poetry run python3 -m kos_loader.kos_loader build/data.json
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: timetable-data
path: kos-loader/build/data.json
retention-days: 3
- name: Push git subdirectory as branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: data
folder: kos-loader/build
token: ${{ secrets.GITHUB_TOKEN }}
git-config-name: 'github-actions[bot]'
git-config-email: 'github-actions[bot]@users.noreply.github.com'
single-commit: true
commit-message: "Update data"