From e46ffba1b1c3638350230af014af0109004bd317 Mon Sep 17 00:00:00 2001 From: kjsato Date: Mon, 29 Jan 2024 10:46:52 -0500 Subject: [PATCH] modified copy_rsv_data.yaml to correct to rsv-forecast-hub repo --- .github/workflows/copy_rsv_data.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/copy_rsv_data.yaml b/.github/workflows/copy_rsv_data.yaml index 8bd10905..791f7465 100644 --- a/.github/workflows/copy_rsv_data.yaml +++ b/.github/workflows/copy_rsv_data.yaml @@ -18,28 +18,28 @@ jobs: fetch-depth: 1 path: ./rsv-forecast-hub_data - name: Remove old rsvnet hospitalization data - run: rm ./rsv-forecast-hub_data/target-data/*_rsvnet_hospitalization.csv + run: rm ./rsv-forecast-hub/target-data/*_rsvnet_hospitalization.csv - name: Copy files run: | - mkdir -p ./rsv-forecast-hub_data/target-data/archive/ - chmod +w ./rsv-forecast-hub_data/target-data/ + mkdir -p ./rsv-forecast-hub/target-data/archive/ + chmod +w ./rsv-forecast-hub/target-data/ FILES=$(curl -s https://api.github.com/repos/midas-network/rsv-scenario-modeling-hub/git/trees/main?recursive=1 | jq -r '.tree[] | select(.path | startswith("target-data/")) | .path') for file in $FILES do FILENAME=$(basename $file) if [[ $file == *_rsvnet_hospitalization.csv && $file != *archive* ]]; then - if [[ ! -f ./rsv-forecast-hub_data/target-data/$FILENAME ]]; then - curl -o ./rsv-forecast-hub_data/target-data/$FILENAME https://raw.githubusercontent.com/midas-network/rsv-scenario-modeling-hub/main/$file + if [[ ! -f ./rsv-forecast-hub/target-data/$FILENAME ]]; then + curl -o ./rsv-forecast-hub/target-data/$FILENAME https://raw.githubusercontent.com/midas-network/rsv-scenario-modeling-hub/main/$file fi elif [[ $file == *_rsvnet_hospitalization.csv && $file == *archive* ]]; then - if [[ ! -f ./rsv-forecast-hub_data/target-data/archive/$FILENAME ]]; then - curl -o ./rsv-forecast-hub_data/target-data/archive/$FILENAME https://raw.githubusercontent.com/midas-network/rsv-scenario-modeling-hub/main/$file + if [[ ! -f ./rsv-forecast-hub/target-data/archive/$FILENAME ]]; then + curl -o ./rsv-forecast-hub/target-data/archive/$FILENAME https://raw.githubusercontent.com/midas-network/rsv-scenario-modeling-hub/main/$file fi fi done - name: Commit and push repository update run: | - cd ./rsv-forecast-hub_data + cd ./rsv-forecast-hub git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" if [ -n "$(git status --porcelain)" ]; then