-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.24 KB
/
getData.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
43
name: Scrape latest data
on:
push:
workflow_dispatch:
schedule:
- cron: '37,59 11,14,20,21 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Install packages
run: |-
pip install pandas
pip install alphaVantage-api
pip install python-dateutil
- name: Get ETF prices
run: |-
python src/get-and-transform-data.py --key ${{ secrets.ALPHAVANTAGE_KEY }} --etf true
shell: sh
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest ETF data: ${timestamp}" || exit 0
git push
- name: Get Mutual Fund prices
run: |-
python src/get-and-transform-data.py --key ${{ secrets.ALPHAVANTAGE_KEY }} --etf false
shell: sh
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest Fund data: ${timestamp}" || exit 0
git push