Skip to content

automated compiling of python requirements (#1349) #287

automated compiling of python requirements (#1349)

automated compiling of python requirements (#1349) #287

name: Docker Images - Build and Publish
on:
push:
branches:
- main
paths:
- admin/run_environment/**
- pyproject.toml
workflow_dispatch:
inputs:
base:
description: "Build 'base' image"
type: boolean
required: true
default: false
build-base:
description: "Build 'build-base' image"
type: boolean
required: true
default: false
build-geosupport:
description: "Build 'build-geosupport' image"
type: boolean
required: true
default: false
dev:
description: "Build 'dev' image"
type: boolean
required: true
default: false
docker-geosupport:
description: "Build 'docker-geosupport' image"
type: boolean
required: true
default: false
jobs:
base:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
if: inputs.base || github.event_name == 'push'
- name: Load Secrets
if: inputs.base || github.event_name == 'push'
uses: 1password/load-secrets-action@v1
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
DOCKER_USERNAME: "op://Data Engineering/Dockerhub/username"
DOCKER_PASSWORD: "op://Data Engineering/Dockerhub/password"
- name: Build and publish base
if: inputs.base || github.event_name == 'push'
run: ./admin/ops/docker_build_and_publish.sh base
build-base:
runs-on: ubuntu-22.04
needs: [base]
if: inputs.build-base || github.event_name == 'push'
defaults:
run:
shell: bash
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 }}
DOCKER_USERNAME: "op://Data Engineering/Dockerhub/username"
DOCKER_PASSWORD: "op://Data Engineering/Dockerhub/password"
- name: Build and publish build-base
run: ./admin/ops/docker_build_and_publish.sh build-base
build-geosupport:
runs-on: ubuntu-22.04
needs: [base]
if: inputs.build-geosupport || github.event_name == 'push'
defaults:
run:
shell: bash
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 }}
DOCKER_USERNAME: "op://Data Engineering/Dockerhub/username"
DOCKER_PASSWORD: "op://Data Engineering/Dockerhub/password"
- name: Build and publish build-geosupport
run: ./admin/ops/docker_build_and_publish.sh build-geosupport
dev:
runs-on: ubuntu-22.04
needs: [base]
if: inputs.dev || github.event_name == 'push'
defaults:
run:
shell: bash
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 }}
DOCKER_USERNAME: "op://Data Engineering/Dockerhub/username"
DOCKER_PASSWORD: "op://Data Engineering/Dockerhub/password"
- name: Build and publish dev
run: ./admin/ops/docker_build_and_publish.sh dev
docker-geosupport:
runs-on: ubuntu-22.04
if: inputs.docker-geosupport || github.event_name == 'push'
defaults:
run:
shell: bash
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 }}
DOCKER_USERNAME: "op://Data Engineering/Dockerhub/username"
DOCKER_PASSWORD: "op://Data Engineering/Dockerhub/password"
- name: Build and publish docker-geosupport
run: ./admin/ops/docker_build_and_publish.sh docker-geosupport