update data #4
This file contains 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 data | |
on: | |
schedule: | |
# Should run at 0:00, 6:00, 12:00, and 16:00 every day (UTC). | |
- cron: '0 0,6,12,16 * * *' | |
workflow_dispatch: | |
jobs: | |
run-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Fetch Data | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
run: python fetch_data.py | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
branch: create-pull-request/patch | |
branch-suffix: timestamp | |
add-paths: | | |
data/* | |
commit-message: data update | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
delete-branch: true | |
title: 'Update Deutsche Bahn data' | |
body: 'Update Deutsche Bahn data' |