generated from hubverse-org/hubTemplate
-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (34 loc) · 1.01 KB
/
update-target.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
name: Update target data
on:
workflow_dispatch:
workflow_run:
workflows: [Update RSV data]
types:
- completed
jobs:
update-target-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install system dependencies
run: sudo apt-get install libcurl4-openssl-dev libudunits2-dev libgdal-dev
- name: Install dependencies
run: |
R -e 'install.packages(c("lubridate", "dplyr", "tidyr", "arrow"))'
- name: Update target data
run: Rscript target-data/get_target_data.R
- name: Commit
run: |
git config user.name Github-Actions
git config user.email "<>"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Update target data $(date)"
git push
echo "Target data updated";
else
echo "no updates";
fi