-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.77 KB
/
collect_metadata.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
48
49
50
51
52
53
54
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: collect_metadata
jobs:
collect:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
EMF_DATABASE_HOST: ${{ secrets.EMF_DATABASE_HOST }}
EMF_DATABASE_USER: ${{ secrets.EMF_DATABASE_USER}}
EMF_DATABASE_PASS: ${{ secrets.EMF_DATABASE_PASS}}
EMF_DATABASE: ${{ secrets.EMF_DATABASE}}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- name: Install system dependencies
run: |
sudo apt-get install -y make libicu-dev pandoc libcurl4-openssl-dev libssl-dev git libgit2-dev libpq-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjpeg-dev libpng-dev libtiff-dev libxml2-dev libssh-dev
- name: Cache keys dependencies
run: |
install.packages('pkgdepends')
saveRDS(pkgdepends::new_pkg_deps('https://github.com/emf-creaf/EMFtoolbox')$resolve()$get_resolution(), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- name: Restore R package cache
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- name: Install packages
run: |
R -e 'install.packages("remotes")'
R -e 'remotes::install_github("emf-creaf/EMFtoolbox")'
- name: Collect metadata and update db
run: |
R -e 'EMFtoolbox::collect_metadata(.dry = FALSE)'