SCL Download Worker #3298
This file contains 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: SCL Download Worker | |
on: | |
schedule: | |
# run every hour | |
- cron: "0 * * * *" | |
jobs: | |
process-raster-data: | |
runs-on: ubuntu-latest | |
environment: production | |
env: | |
DB_USER: ${{ secrets.DB_USER }} | |
DB_PW: ${{ secrets.DB_PW}} | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |
DB_NAME: ${{ secrets.DB_NAME }} | |
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }} | |
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }} | |
SH_INSTANCE_ID: ${{ secrets.SH_INSTANCE_ID }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} | |
RUNPOD_ENDPOINT_ID: ${{ secrets.RUNPOD_ENDPOINT_ID }} | |
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run main script | |
run: > | |
python -m src.scl_service.main |