update data population script #65
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
on: [push] | |
jobs: | |
etl: | |
environment: | |
name: staging-data-flow | |
runs-on: ubuntu-latest | |
env: | |
BUILD_ENGINE_USER: postgres | |
BUILD_ENGINE_PASSWORD: postgres | |
BUILD_ENGINE_DB: postgres | |
BUILD_ENGINE_HOST: 127.0.0.1 | |
BUILD_ENGINE_PORT: 5432 | |
ZONING_API_USER: ${{ secrets.ZONING_API_USER}} | |
ZONING_API_PASSWORD: ${{ secrets.ZONING_API_PASSWORD }} | |
ZONING_API_DB: ${{ secrets.ZONING_API_DB }} | |
ZONING_API_HOST: ${{ secrets.ZONING_API_HOST }} | |
ZONING_API_PORT: ${{ secrets.ZONING_API_PORT }} | |
DO_SPACES_ENDPOINT: ${{ secrets.DO_SPACES_ENDPOINT }} | |
DO_SPACES_ACCESS_KEY: ${{ secrets.DO_SPACES_ACCESS_KEY }} | |
DO_SPACES_SECRET_KEY: ${{ secrets.DO_SPACES_SECRET_KEY }} | |
services: | |
postgres: | |
image: postgis/postgis:15-3.4-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: check out repo code | |
uses: actions/checkout@v4 | |
- name: Install prerequisite packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget | |
sudo apt-get install -y git | |
- name: Install GDal | |
run: | | |
sudo apt-get install -y gdal-bin | |
- name: Setup PostgreSQL | |
uses: tj-actions/install-postgresql@v3 | |
with: | |
postgresql-version: 15 | |
- name: Check postgres install | |
run: pg_dump --version | |
- name: Install minio client | |
run: | | |
sudo wget https://dl.min.io/client/mc/release/linux-amd64/mc | |
sudo chmod +x mc | |
sudo mv mc /usr/local/bin | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: ".python-version" | |
- name: Install python dependencies | |
run: pip install -r requirements.txt | |
- name: Install dbt dependencies | |
run: dbt deps | |
- name: Download | |
run: ./bash/download.sh | |
- name: Import | |
run: ./bash/import.sh | |
- name: Transform | |
run: ./bash/transform.sh | |
- name: Export | |
run: ./bash/export.sh | |
- name: Update | |
run: ./bash/update_api_db.sh | |