-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.11 KB
/
data_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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'