Skip to content

Process

Process #1

Workflow file for this run

name: Process
on:
workflow_dispatch:
workflow_call:
env:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/postgres"
AWS_ENDPOINT_URL: "https://nrs.objectstore.gov.bc.ca"
AWS_S3_ENDPOINT: "nrs.objectstore.gov.bc.ca"
AWS_VIRTUAL_HOSTING: "FALSE"
AWS_EC2_METADATA_DISABLED: "true"
CPL_VSISTDIN_BUFFER_LIMIT: -1
OBJECTSTORE_BUCKET: ${{ secrets.OBJECTSTORE_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
harvest-restrictions:
runs-on: ubuntu-latest
name: harvest-restrictions
container: ghcr.io/bcgov/harvest-restrictions:main
environment: production
services:
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Load sources to database
run: |
python download.py cache2pg sources.json -v --out_table designations --in_path s3://$OBJECTSTORE_BUCKET/dss_projects_2024/harvest_restrictions/sources
- name: Process overlays
run: |
git config --global --add safe.directory /__w/harvest-restrictions/harvest-restrictions
./harvest_restrictions.sh