Skip to content

1c. Update SV ImpactsList Data (as needed) #5

1c. Update SV ImpactsList Data (as needed)

1c. Update SV ImpactsList Data (as needed) #5

name: Update SV ImpactsList Data
on:
workflow_dispatch:
inputs:
fredi_data_branches:
type: choice
description: Which branch of FrEDI_data to pull in data from
options:
- main
- state_data
- state_data
- data_only_branch_tkg
- initial_actions
- initial_actions_tkg
sv_impact_type:
type: choice
description: Which branch SV impact type data object to update
options:
- impactsList_airQuality
- impactsList_coastalProp
- impactsList_extremeTemp
- impactsList_htf
- impactsList_labor
- impactsList_roads
jobs:
get_data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Commit results
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull --depth=1 --ff https://github.com/USEPA/FrEDI_Data.git ${{ github.event.inputs.fredi_data_branches }} --allow-unrelated-histories
mv data_new/sv/impactsLists/${{ github.event.inputs.sv_impact_type }}*.rds FrEDI/inst/extdata/sv/impactLists/
git branch --show-current
git add FrEDI/R/${{ github.event.inputs.sv_impact_type }}*
git pull origin ${{ github.head_ref }} --autostash --rebase -X ours
git status
git commit -am "add new ${{ github.event.inputs.sv_impact_type }} data from FrEDI_Data"
git push