-
Notifications
You must be signed in to change notification settings - Fork 81
74 lines (73 loc) · 2.8 KB
/
update-external-resources.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Update external resources
on:
schedule:
# Run every day at 00:00
- cron: '0 0 * * *'
# Enable manually updating the external resources
workflow_dispatch:
jobs:
update_external_resources:
name: Update external resources
runs-on: ubuntu-latest
steps:
# Scheduled workflows run on the default branch
- name: Checkout external-resources branch
uses: actions/checkout@v2
with:
ref: external-resources
- name: Install environment # Use mamba as in https://github.com/conda-incubator/setup-miniconda/issues/274 and https://github.com/conda-incubator/setup-miniconda#example-10-miniforge
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: covid19
environment-file: environment.yml
auto-activate-base: false
miniforge-variant: Mambaforge
channels: conda-forge
channel-priority: true
use-mamba: true
- name: List information about mamba and environment
shell: bash --login {0}
run: |
mamba info
mamba list
mamba config --show-sources
mamba config --show
printenv | sort
- name: Update JHU CSSE data
shell: bash --login {0}
run: bash csse/generate-csse-stats.sh
- name: Update EBM Data Lab data
shell: bash --login {0}
run: bash ebmdatalab/generate-ebmdatalab-stats.sh
- name: Update OWID data
shell: bash --login {0}
run: bash owiddata/generate-owiddata-stats.sh
- name: Update CORD-19 data
shell: bash --login {0}
run: bash CORD-19/generate-cord19-stats.sh
# - name: Update manuscript statistics data
# shell: bash --login {0}
# run: bash analyze-ms-stats/calc-manuscript-stats.sh
- name: Commit JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth figures
uses: EndBug/add-and-commit@v4
with:
add: '*/*.png */*.svg */*/*.png */*/*.svg'
author_name: GitHub Actions
author_email: actions@github.com
message: 'Update JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth figures'
ref: external-resources
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update figure versions
shell: bash --login {0}
run: bash version-figures.sh
- name: Commit JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth statistics
uses: EndBug/add-and-commit@v4
with:
add: '*/*.json'
author_name: GitHub Actions
author_email: actions@github.com
message: 'Update JHU CSSE, EBM Data Lab, OWID, CORD-19, and manuscript growth statistics'
ref: external-resources
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}