🏗️ Build a Dataset: facilities #1344
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: 🏗️ Build a Dataset | |
run-name: "🏗️ Build a Dataset: ${{ inputs.dataset_name }}" | |
on: | |
workflow_dispatch: | |
inputs: | |
dataset_name: | |
description: "Which dataset to build" | |
type: choice | |
required: true | |
options: | |
- template | |
- cbbr | |
- checkbook | |
- colp | |
- cpdb | |
- developments | |
- facilities | |
- factfinder | |
- green_fast_track | |
- knownprojects | |
- pluto | |
- ztl | |
- all | |
recipe_file: | |
description: "Recipe filename to use" | |
type: string | |
options: | |
- recipe | |
- recipe-minor | |
required: true | |
default: recipe | |
version: | |
description: "Version of dataset being built (overrides version defined in recipe)" | |
type: string | |
required: false | |
dev_image: | |
description: "Use dev image specific to this branch (if exists)" | |
type: boolean | |
required: true | |
default: false | |
logging_level: | |
description: "Logging level" | |
type: choice | |
required: true | |
default: INFO | |
options: | |
- WARNING | |
- INFO | |
- DEBUG | |
build_name: | |
description: "Build name (defaults to branch name)" | |
type: string | |
required: false | |
build_note: | |
description: "An optional note about this build" | |
type: string | |
required: false | |
dev_bucket: | |
description: "dev bucket to use in place of recipes/publishing. If name of bucket is 'de-dev-a' simply put 'a'" | |
type: string | |
required: false | |
workflow_call: | |
inputs: | |
dataset_name: | |
type: string | |
required: true | |
build_note: | |
type: string | |
required: false | |
recipe_file: | |
type: string | |
required: true | |
dev_image: | |
type: string | |
default: false | |
required: false | |
build_name: | |
type: string | |
required: false | |
dev_bucket: | |
type: string | |
required: false | |
env: | |
tag: ${{ (inputs.dev_image == 'true' || inputs.dev_image == true) && format('dev-{0}', github.head_ref || github.ref_name) || 'latest' }} | |
build_name: ${{ inputs.build_name || github.head_ref || github.ref_name }} | |
version: ${{ github.event.inputs.version && format('--version {0}', github.event.inputs.version) || '' }} | |
jobs: | |
health_check: | |
name: Health Check | |
runs-on: ubuntu-latest | |
outputs: | |
plan_command: recipe --recipe-path ./${{ inputs.recipe_file }}.yml ${{ env.version }} | |
tag: ${{ env.tag }} | |
build_name: ${{ env.build_name }} | |
steps: | |
- name: Check inputs | |
run: | | |
echo "running with image tag ${{ (inputs.dev_image == 'true'|| inputs.dev_image == true) && format('dev-{0}', github.head_ref || github.ref_name) || 'latest' }}" | |
echo "Workflow inputs are:" | |
echo "${{ toJSON(github.event.inputs) }}" | |
template: | |
needs: health_check | |
if: inputs.dataset_name == 'template' | |
uses: ./.github/workflows/template_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
logging_level: ${{ inputs.logging_level }} | |
build_note: ${{ inputs.build_note }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
cbbr: | |
needs: health_check | |
if: inputs.dataset_name == 'cbbr' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/cbbr_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
logging_level: ${{ inputs.logging_level }} | |
build_note: ${{ inputs.build_note }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
checkbook: | |
needs: health_check | |
if: inputs.dataset_name == 'checkbook' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/checkbook_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
colp: | |
needs: health_check | |
if: inputs.dataset_name == 'colp' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/colp_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
cpdb: | |
needs: health_check | |
if: inputs.dataset_name == 'cpdb' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/cpdb_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
developments: | |
needs: health_check | |
if: inputs.dataset_name == 'developments' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/developments_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
facilities: | |
needs: health_check | |
if: inputs.dataset_name == 'facilities' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/facilities_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
factfinder: | |
needs: health_check | |
if: inputs.dataset_name == 'factfinder' | |
uses: ./.github/workflows/factfinder_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
green_fast_track: | |
needs: health_check | |
if: inputs.dataset_name == 'green_fast_track' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/green_fast_track_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
recipe_file: ${{ inputs.recipe_file }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
knownprojects: | |
needs: health_check | |
if: inputs.dataset_name == 'knownprojects' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/knownprojects_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
pluto: | |
needs: health_check | |
if: inputs.dataset_name == 'pluto' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/pluto_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} | |
ztl: | |
needs: health_check | |
if: inputs.dataset_name == 'ztl' || inputs.dataset_name == 'all' | |
uses: ./.github/workflows/zoningtaxlots_build.yml | |
secrets: inherit | |
with: | |
image_tag: ${{ needs.health_check.outputs.tag }} | |
build_name: ${{ needs.health_check.outputs.build_name }} | |
recipe_file: ${{ inputs.recipe_file }} | |
plan_command: ${{ needs.health_check.outputs.plan_command }} | |
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }} |