Run pipeline #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run pipeline | |
| on: | |
| schedule: | |
| # Runs at 06:00 UTC on the 1st and 15th of every month | |
| - cron: "0 6 1,15 * *" | |
| workflow_dispatch: | |
| # Allows a manual run from the GitHub Actions UI | |
| inputs: | |
| aoi_name: | |
| description: "AOI name to run (leave blank to run all)" | |
| required: false | |
| default: "" | |
| jobs: | |
| run-pipeline: | |
| name: Ingest, train, forecast | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
| AWS_STAC_API_URL: ${{ vars.AWS_STAC_API_URL }} | |
| MPC_STAC_API_URL: ${{ vars.MPC_STAC_API_URL }} | |
| AOI_NAME: ${{ github.event.inputs.aoi_name }} | |
| S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| - name: Install GDAL system dependencies | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y --no-install-recommends \ | |
| gdal-bin libgdal-dev libspatialindex-dev | |
| - name: Install Python dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run pipeline | |
| run: python run_pipeline.py | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pipeline-logs | |
| path: logs/ | |
| retention-days: 7 |