1c. Update SV ImpactsList Data (as needed) #7
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
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/inst/extdata/sv/impactLists/${{ 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 |