Retrieve the CR3 download secrets with 1PW #21
Workflow file for this run
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 Docker images and push to DockerHub" | |
on: | |
# Triggers the workflow on push or pull request events but only for the master and production branches | |
# and any updates to the atd-etl scripts | |
push: | |
branches: | |
- master | |
- production | |
paths: | |
- ".github/workflows/build_docker_images.yml" | |
- "atd-etl/afd_ems_import/**" | |
- "atd-etl/cris_import/**" | |
- "atd-etl/cr3_extract_diagram/**" | |
- "atd-etl/socrata_export/**" | |
pull_request: | |
branches: | |
- master | |
- production | |
paths: | |
- ".github/workflows/build_docker_images.yml" | |
- "atd-etl/afd_ems_import/**" | |
- "atd-etl/cris_import/**" | |
- "atd-etl/cr3_extract_diagram/**" | |
- "atd-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@v3 | |
- name: "Paths filter" | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
afd_ems: | |
- 'atd-etl/afd_ems_import/**' | |
cris: | |
- 'atd-etl/cris_import/**' | |
cr3_extract: | |
- 'atd-etl/cr3_extract_diagram/**' | |
socrata_export: | |
- 'atd-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: atd-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: atd-etl/cris_import | |
push: true | |
tags: atddocker/vz-cris-import:${{ github.ref == 'refs/heads/production' && 'production' || 'latest' }} | |
- name: Build and push CR3 extract diagram image | |
if: steps.changes.outputs.cr3_extract == 'true' | |
uses: docker/build-push-action@v4 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: atd-etl/cr3_extract_diagram | |
push: true | |
tags: atddocker/atd-vz-cr3-extract:${{ github.ref == 'refs/heads/master' && '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: atd-etl/socrata_export | |
push: true | |
tags: atddocker/vz-socrata-export:${{ github.ref == 'refs/heads/master' && 'production' || 'latest' }} |