Skip to content

Download - daily

Download - daily #80

name: Download - daily
on:
schedule:
- cron: '0 18 * * *'
workflow_dispatch:
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
BUCKET: ${{ secrets.BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
get-matrix:
runs-on: ubuntu-latest
container: ghcr.io/bcgov/fit_opendatadownloader:main
environment: production
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Install tool
run: |
python -m pip install .
- id: set-matrix
run: |
DATA=$(fit_downloader list-configs -s D | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=$DATA" >> $GITHUB_OUTPUT
process:
runs-on: ubuntu-latest
container: ghcr.io/bcgov/fit_opendatadownloader:main
environment: production
needs: get-matrix
if: ${{ needs.get-matrix.outputs.matrix != '[]' && needs.get-matrix.outputs.matrix != '' }}
strategy:
fail-fast: false
matrix:
arg: ${{fromJson(needs.get-matrix.outputs.matrix)}}
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
- name: Install tool
run: |
python -m pip install .
- name: Process source
run: |
fit_downloader process -v --out-path s3://$BUCKET/Change_Detection/${{ matrix.arg }} -s D sources/${{ matrix.arg }}.json