-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.04 KB
/
data_refresh_test.yml
File metadata and controls
37 lines (36 loc) · 1.04 KB
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
name: Data Refresh
on: [push]
#schedule:
# - cron: '0 */4 * * *'
jobs:
data_refresh_test:
name: Data refresh test
runs-on: ubuntu-18.04
container:
image: rkrispin/covid19rdata:dev
steps:
- name: checkout_repo
uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
ref: 'rami-dev'
token: ${{ github.token }}
clean: 'true'
fetch-depth: '1'
- name: Install Github packages
run: |
git config --global http.sslVerify false
Rscript -e "devtools::load_all(); acquire_data()"
- name: Push updates
if: success()
run: |
if [ -n "$(git status --porcelain)" ]; then
echo 'Updates available'
git config --global user.name 'RamiKrispin'
git config --global user.email 'ramkrisp@umich.edu'
git add data-raw/*
git commit -m 'Auto-update'
git push
else
echo 'Nothing to commit';
fi