-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (30 loc) · 1.3 KB
/
update_base_data.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
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