Skip to content

GEE Data Catalog Parser #242

GEE Data Catalog Parser

GEE Data Catalog Parser #242

Workflow file for this run

name: GEE Data Catalog Parser
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * 3"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8.x"
# TODO: Add pip cache and requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests earthengine-api
- name: Set up credentials
run: |
mkdir -p "$HOME/.config/earthengine"
echo "$EARTH_ENGINE_KEY" > "$HOME/.config/earthengine/credentials"
export EARTH_ENGINE_PROJECT="$EARTH_ENGINE_PROJECT"
env:
EARTH_ENGINE_KEY: ${{ secrets.EARTH_ENGINE_SECRET }}
EARTH_ENGINE_PROJECT: ${{ secrets.EARTH_ENGINE_PROJECT }}
- name: Run catalog parser
run: python3 ./Data/webparser.py
env:
EARTH_ENGINE_PROJECT: ${{ secrets.EARTH_ENGINE_PROJECT }}
- name: Commit JSON file
run: |
git config --global user.name 'GitHub Action'
git config --local user.email "[email protected]"
git add -A
git commit -m "Updated GEE datasets ($(date +"%Y-%m-%d"))" -a
- name: Push JSON file
run: git push