-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (79 loc) · 2.61 KB
/
update_svImpacts.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
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
### Overwrite FrEDI data with past data
name: Compile SV Impacts
on:
workflow_dispatch:
inputs:
svSectors:
type: choice
description: Which SV impact sectors to update
options:
- Air Quality - Childhood Asthma
- Air Quality - Premature Mortality
- Labor
- Extreme Temperature
- Roads
- Transportation Impacts from High Tide Flooding
- Coastal Properties
branch_name:
type: string
description: Which FrEDI Package branch do you want to use?
jobs:
compile_data:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
name: Process Data
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Send sector selection
run: |
echo "${{ github.event.inputs.svSectors }}"
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Setup R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
cache-version: 1
packages: |
any::tidyverse
any::ggpubr
any::openxlsx
any::devtools
- name: Install FrEDI
run: |
Rscript -e 'devtools::install_github(
repo = "https://github.com/USEPA/FrEDI",
ref = "${{ github.event.inputs.branch_name }}",
subdir = "FrEDI",
dependencies = FALSE,
upgrade = "never",
force = TRUE,
type = "source"
)'
#
# - name: Configure SV data
# run: |
# Rscript -e '
# source("./scripts/update_svImpactLists.R")
# fpath1 <- "."
# fpath1 |> print()
# sectors1 <- c("${{ github.event.inputs.svSectors }}")
# list1 <- update_svImpactLists(
# fpath0 = fpath1,
# sectors = sectors1,
# save = T,
# return = F
# )
# '
#
# - name: Commit results
# run: |
# git config --local core.autocrlf false
# git config --local user.email "${{ github.actor }}@users.noreply.github.com"
# git config --local user.name "${{ github.actor }}"
# git add data/sv/impactsLists/**.rds
# git pull origin ${{ github.head_ref }} --autostash --rebase -X ours
# git commit -a -m "Updated SV FrEDI impact lists for ${{ github.event.inputs.svSectors }}"
# git push