Skip to content

Add data ingestion mechanism #48

Add data ingestion mechanism

Add data ingestion mechanism #48

Workflow file for this run

name: Data ingestion
on:
push:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
jobs:
data_ingestion:
environment: glvd-data-ingestion
name: data ingestion
runs-on: ubuntu-latest
env:
PGHOST: "${{ vars.PGHOST }}"
PGPORT: ${{ vars.PGPORT }}
PGUSER: ${{ vars.PGUSER }}
PGPASSWORD: ${{ secrets.PGPASSWORD }}
PGDATABASE: ${{ vars.PGDATABASE }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Prepare data ingestion
run: ./src/prepare_ingestion.sh
- name: Run data ingestion
run: >
docker run
--network host
--rm
--volume $PWD/tmp/:/opt/glvd-data-ingestion/data
--volume $PWD/src/:/opt/glvd-data-ingestion/src
--entrypoint=/bin/bash
--env PGHOST="$PGHOST"
--env PGPORT="$PGPORT"
--env PGUSER="$PGUSER"
--env PGPASSWORD="$PGPASSWORD"
--env PGDATABASE="$PGDATABASE"
${{ steps.build.outputs.imageid }}
/opt/glvd-data-ingestion/src/data_ingestion.sh