Skip to content

Update 24-month SPI Anomaly (Long-term) #91

Update 24-month SPI Anomaly (Long-term)

Update 24-month SPI Anomaly (Long-term) #91

name: Update 24-month SPI Anomaly (Long-term)
on:
push:
branches:
- earthengine-actions
workflow_dispatch:
# Allows manual triggering of the action
schedule:
- cron: "0 12 * * 2" # Runs every Tuesday at 12:00 UTC
jobs:
spi-24-month:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
env:
RW_API_KEY: ${{ secrets.RW_API_KEY }}
BUCKET: ${{ vars.BUCKET }}
IMAGES_PREFIX_PATH: ${{ vars.IMAGES_PREFIX_PATH }}
GS_STAGING_PREFIX: ${{ vars.GS_STAGING_PREFIX }}
GEE_PROJECT_FOLDER: ${{ vars.GEE_PROJECT_FOLDER }}
MONTH_3_LAYER_ID: ${{ vars.MONTH_3_LAYER_ID }}
MONTH_24_LAYER_ID: ${{ vars.MONTH_24_LAYER_ID }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Upgrade pip & Install dependencies
run: |
pip3 install --upgrade pip==22.0
echo "Installing Python dependencies"
if [ -f ./automation/requirements.txt ]; then pip install -r ./automation/requirements.txt; fi
pip install rasterio
pip install earthengine-api
pip install earthengine-api --upgrade
- uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}"
# Get file source name and put it on env
- name: Run Python Script on File
run: |
echo "ENVS TO USE"
echo "BUCKET"
echo "IMAGES_PREFIX_PATH"
echo "GS_STAGING_PREFIX"
echo "GEE_PROJECT_FOLDER"
echo "RW_API_KEY"
echo "MONTH_24_LAYER_ID"
python automation/month_24_automation.py