-
Notifications
You must be signed in to change notification settings - Fork 160
47 lines (44 loc) · 1.78 KB
/
update_timeseries.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
44
45
46
47
name: Update CDC timeseries
on:
schedule:
- cron: '55 * * * *'
defaults:
run:
working-directory: data-collection-scripts/cdc-vaccinations-timeseries/
jobs:
update:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Use Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run script
run: |
python make_timeseries.py data/cdc_vaccinations.json vaccination_data > ../../data/cdc_vaccinations_timeseries.csv
python make_timeseries.py data/cdc_vaccinations.json vaccination_data --strip-duplicate-days > ../../data/cdc_vaccinations_timeseries_daily.csv
python make_timeseries.py data/cdc_vaccinations_ltc.json vaccination_ltc_data > ../../data/cdc_vaccinations_ltc_timeseries.csv
python make_timeseries.py data/cdc_vaccinations_ltc.json vaccination_ltc_data --strip-duplicate-days > ../../data/cdc_vaccinations_ltc_timeseries_daily.csv
- name: Commit
if: github.ref == 'refs/heads/master'
uses: EndBug/add-and-commit@v5
with:
message: Updating timeseries
add: 'data/cdc_vaccinations*'
author_name: GitHub Actions
author_email: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}