Zoning Tax lots - 📁 DataLoading #69
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
name: Zoning Tax lots - 📁 DataLoading | |
on: | |
workflow_dispatch: | |
inputs: | |
build_ztl: | |
description: "Build Zoning Tax Lots after dataloading is complete" | |
type: boolean | |
default: true | |
build_pluto_minor: | |
description: "Build PLUTO (Minor) after dataloading is complete" | |
type: boolean | |
default: false | |
promote: | |
description: "Promote ZTL (and PLUTO if built) to `draft` folder after build" | |
type: boolean | |
required: true | |
default: true | |
dev_image: | |
description: "Use dev image specific to this branch? (If exists)" | |
type: boolean | |
required: true | |
default: false | |
dev_bucket: | |
description: "Dev bucket in DO to use, if not a production run." | |
type: string | |
required: false | |
jobs: | |
dataloading: | |
runs-on: ubuntu-22.04 | |
container: | |
image: nycplanning/build-base:${{ inputs.dev_image && format('dev-{0}', github.head_ref || github.ref_name) || 'latest' }} | |
env: | |
RECIPES_BUCKET: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || 'edm-recipes' }} | |
strategy: | |
matrix: | |
dataset: | |
- dcp_mih | |
- dcp_edesignation | |
- dcp_commercialoverlay | |
- dcp_limitedheight | |
- dcp_zoningdistricts | |
- dcp_specialpurpose | |
- dcp_specialpurposesubdistricts | |
- dcp_zoningmapamendments | |
- dof_dtm | |
- dof_shoreline | |
- dof_condo | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Load Secrets | |
uses: 1password/load-secrets-action@v1 | |
with: | |
export-env: true | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
AWS_S3_ENDPOINT: "op://Data Engineering/DO_keys/AWS_S3_ENDPOINT" | |
AWS_SECRET_ACCESS_KEY: "op://Data Engineering/DO_keys/AWS_SECRET_ACCESS_KEY" | |
AWS_ACCESS_KEY_ID: "op://Data Engineering/DO_keys/AWS_ACCESS_KEY_ID" | |
BUILD_ENGINE_SERVER: "op://Data Engineering/EDM_DATA/server_url" | |
- name: Finish container setup | |
working-directory: ./ | |
run: ./bash/docker_container_setup.sh | |
- name: Library Archive | |
run: library archive --name ${{ matrix.dataset }} --latest --s3 | |
build_ztl: | |
needs: [dataloading] | |
name: Build ZTL | |
if: inputs.build_ztl | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
with: | |
dataset_name: ztl | |
dev_image: ${{ inputs.dev_image }} | |
dev_bucket: ${{ inputs.dev_bucket }} | |
recipe_file: recipe | |
pluto_minor: | |
needs: [dataloading] | |
name: Build Pluto Minor | |
if: inputs.build_pluto_minor | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
with: | |
dataset_name: pluto | |
dev_image: ${{ inputs.dev_image }} | |
dev_bucket: ${{ inputs.dev_bucket }} | |
recipe_file: recipe-minor | |
promote_ztl_to_draft: | |
needs: [dataloading, build_ztl] | |
name: Promote ZTL build to Draft folder | |
if: inputs.promote | |
uses: ./.github/workflows/promote_to_draft.yml | |
secrets: inherit | |
with: | |
product: db-zoningtaxlots | |
build: ${{ github.head_ref || github.ref_name }} | |
product_acl: public-read | |
dev_bucket: ${{ inputs.dev_bucket }} | |
promote_pluto_to_draft: | |
needs: [dataloading, pluto_minor] | |
name: Promote PLUTO build to Draft folder | |
if: inputs.promote | |
uses: ./.github/workflows/promote_to_draft.yml | |
secrets: inherit | |
with: | |
product: db-pluto | |
build: ${{ github.head_ref || github.ref_name }} | |
product_acl: public-read | |
dev_bucket: ${{ inputs.dev_bucket }} |