update funding #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)' |