generated from trias-project/checklist-recipe
-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (76 loc) · 2.25 KB
/
fetch-data_mapping.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
on:
schedule:
- cron: "0 3 */7 * *"
push:
branches:
- main
paths:
- src/**
workflow_dispatch:
branches: [ main ]
name: fetch-data
jobs:
fetch-data:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_TOKEN: ${{ secrets.WORKFLOWS }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOWS }}
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install linux libraries
run: |
sudo apt install libsodium-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libgdal-dev libproj-dev
sudo apt install libudunits2-dev
- name: Install R packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
needs: check
- name: Fetch data and map to DwC
env:
ratopwd: ${{ secrets.RATOPWD }}
run: |
source("src/run_fetch_data.R")
source("src/run_dwc_mapping.R")
shell: Rscript {0}
- name: Commit and push changes
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.WORKFLOWS }}
commit_prefix: "[AUTO]"
commit_message: "Mapping"
target_branch: automatic-update
add_timestamp: true
- name: Get branch name
run: |
git branch --show-current
- name: Create pull request
uses: devops-infra/[email protected]
with:
github_token: ${{ secrets.WORKFLOWS }}
target_branch: main
title: "[AUTO] Update data"
template: .github/PULL_REQUEST_TEMPLATE.md
reviewer: PietrH
label: automated workflow
get_diff: false