-
Notifications
You must be signed in to change notification settings - Fork 33
42 lines (33 loc) · 982 Bytes
/
data_collection.yml
File metadata and controls
42 lines (33 loc) · 982 Bytes
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
# Reach out to OWM API to download data
name: Load data
on:
# Run every day
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
harvest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Install requirements
run: pip install -r extra/weather/requirements.txt
- name: Harvest the data
env:
API_KEY: ${{ secrets.OWM_API_KEY }}
run: python extra/weather/get_data.py run --api-key="$API_KEY"
- name: Commit and push new data
uses: EndBug/add-and-commit@v5
with:
add: 'extra/weather/data/.'
message: "Data download via Github action"
author_name: mmaelicke
author_email: mirko.maelicke@kit.edu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}