Skip to content

Update generate_json_files.yml #5

Update generate_json_files.yml

Update generate_json_files.yml #5

name: Run main.py with Config
on:
push:
branches: [ yl_dv ]
pull_request:
branches: [ yl_dv ]
schedule:
# Runs at 00:00 UTC every day
- cron: '0 0 * * *'
jobs:
download-multiple-folders:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3
- name: Download folder from Repo 1
run: |
# Clean the destination folder
if [ -d "data/challenge/neon4cast-stac" ]; then
rm -rf data/challenge/neon4cast-stac/*
fi
# Clone the specific folder from Repo 1
mkdir -p temp-repo1
cd temp-repo1
git init
git remote add origin https://github.com/eco4cast/neon4cast-ci.git
git config core.sparseCheckout true
echo "path/to/folder1" >> .git/info/sparse-checkout
git pull origin main
mv path/to/folder1 ../data/challenge/neon4cast-stac/
cd ..
rm -rf temp-repo1
- name: Download folder from Repo 2
run: |
# Clean the destination folder
if [ -d "data/challenge/vera4cast-stac" ]; then
rm -rf data/challenge/vera4cast-stac/*
fi
# Clone the specific folder from Repo 2
mkdir -p temp-repo2
cd temp-repo2
git init
git remote add origin https://github.com/LTREB-reservoirs/vera4cast.git
git config core.sparseCheckout true
echo "path/to/folder2" >> .git/info/sparse-checkout
git pull origin main
mv path/to/folder2 ../data/challenge/vera4cast-stac/
cd ..
rm -rf temp-repo2
- name: Download folder from Repo 3
run: |
# Clean the destination folder
if [ -d "data/challenge/usgsrc4cast-stac" ]; then
rm -rf data/challenge/usgsrc4cast-stac/*
fi
# Clone the specific folder from Repo 3
mkdir -p temp-repo3
cd temp-repo3
git init
git remote add origin https://github.com/eco4cast/usgsrc4cast-ci.git
git config core.sparseCheckout true
echo "path/to/folder3" >> .git/info/sparse-checkout
git pull origin main
mv path/to/folder3 ../data/challenge/usgsrc4cast-stac/
cd ..
rm -rf temp-repo3
run-script:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # Specify the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run main.py with configfile
run: |
python main.py --configfile ./data/challenge/catalog-yl.json