Skip to content

Commit

Permalink
split download and process workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Aug 17, 2024
1 parent 1556213 commit 210c852
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/download.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Download
on:
workflow_dispatch:
workflow_call:
env:
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
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Download sources to S3
run: |
python download.py download sources.json -v --out_path s3://$OBJECTSTORE_BUCKET/dss_projects_2024/harvest_restrictions/sources
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Harvest restrictions
name: Process
on:
workflow_dispatch:
workflow_call:
Expand Down Expand Up @@ -33,9 +33,6 @@ jobs:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Download sources to S3
run: |
python download.py download sources.json -v --out_path s3://$OBJECTSTORE_BUCKET/dss_projects_2024/harvest_restrictions/sources
- 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
Expand Down

0 comments on commit 210c852

Please sign in to comment.