Skip to content

1a. Update Base System Data #40

1a. Update Base System Data

1a. Update Base System Data #40

name: 1a. Update Base System Data
on:
workflow_dispatch:
inputs:
data_branch:
type: string
description: From which data-only branch of FrEDI_Data do you want to pull in data (e.g., entering "state_initial" will pull from the "data_only_branch_state_initial" branch on FrEDI_data)?
### git pull --depth=1 --ff https://github.com/USEPA/FrEDI_Data.git data_only_branch_${{ github.event.inputs.data_branch }} --allow-unrelated-histories
jobs:
get_data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Commit results
run: |
branch1="data_only_branch_"
branch2="${{ github.event.inputs.data_branch }}"
branch0="${branch1}${branch2}"
echo branch0
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 "$branch0" --allow-unrelated-histories
mv data/sysdata.rd* R/sysdata.rd*
git branch --show-current
git add R/sysdata.rd*
git rm -r data
git pull origin ${{ github.head_ref }} --autostash --rebase -X ours
git status
git commit -am "updated sysdata.rda from ${{ github.event.inputs.data_branch }}"
git push