Skip to content

Return of the OCR'd crash narrative #190

Return of the OCR'd crash narrative

Return of the OCR'd crash narrative #190

name: "Build Docker images and push to DockerHub"
on:
# Triggers the workflow on push or pull request events but only for the main and production branches
# and any updates to the etl scripts
push:
branches:
- main
- production
paths:
- ".github/workflows/build_docker_images.yml"
- "etl/afd_ems_import/**"
- "etl/cris_import/**"
- "etl/socrata_export/**"
pull_request:
branches:
- main
- production
paths:
- ".github/workflows/build_docker_images.yml"
- "etl/afd_ems_import/**"
- "etl/cris_import/**"
- "etl/socrata_export/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build docker images
runs-on: ubuntu-22.04
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: "Checkout"
uses: actions/checkout@v4
- name: "Paths filter"
uses: dorny/paths-filter@v3
id: changes
with:
base: ${{ github.ref }}
filters: |
afd_ems:
- 'etl/afd_ems_import/**'
cris:
- 'etl/cris_import/**'
socrata_export:
- 'etl/socrata_export/**'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push AFD / EMS image
if: steps.changes.outputs.afd_ems == 'true'
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: etl/afd_ems_import
push: true
tags: atddocker/vz-afd-ems-import:${{ github.ref == 'refs/heads/production' && 'production' || 'latest' }}
- name: Build and push CRIS import image
if: steps.changes.outputs.cris == 'true'
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: etl/cris_import
push: true
tags: atddocker/vz-cris-import:${{ github.ref == 'refs/heads/production' && 'production' || 'latest' }}
- name: Build and push Socrata export image
if: steps.changes.outputs.socrata_export == 'true'
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: etl/socrata_export
push: true
tags: atddocker/vz-socrata-export:${{ github.ref == 'refs/heads/production' && 'production' || 'development' }}