Skip to content

Commit

Permalink
modified after-validate-submission.yaml to switch the former repo con…
Browse files Browse the repository at this point in the history
…text
  • Loading branch information
kjsato committed Mar 5, 2024
1 parent d919853 commit 1202c9a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/after-validate-submission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- completed

jobs:
job1:
copy-files-to-rsv-data-repo:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
Expand All @@ -26,14 +26,20 @@ jobs:

- name: Copy new files
run: |
cd ..
FILES=$(git diff --name-only HEAD^ HEAD)
for FILE in $FILES
do
if [[ $FILE == model-output/* ]] || [[ $FILE == model-metadata/* ]]; then
mkdir -p ./rsv-forecast-hub_data/$(dirname $FILE)
cp $FILE ./rsv-forecast-hub_data/$FILE
fi
done
if [ -d "./rsv-forecast-hub_data" ]; then
cd ./rsv-forecast-hub_data
for FILE in $FILES
do
if [[ $FILE == model-output/* ]] || [[ $FILE == model-metadata/* ]]; then
mkdir -p ./rsv-forecast-hub_data/$(dirname $FILE)
cp $FILE ./rsv-forecast-hub_data/$FILE
fi
done
else
echo "Directory ./rsv-forecast-hub_data does not exist"
fi
- name: Commit and push new files
run: |
Expand Down

0 comments on commit 1202c9a

Please sign in to comment.