Skip to content

Build Docker Images #213

Build Docker Images

Build Docker Images #213

name: Build Docker Images
on:
workflow_dispatch:
inputs:
tag:
description: "Docker Image Tag"
required: false
default: "development-tag"
env:
REGISTRY: ghcr.io
TAG: ${{ github.event.inputs.tag }}
SPS_AIRFLOW: ${{ github.repository }}/sps-airflow
SPS_DOCKER_CWL: ${{ github.repository }}/sps-docker-cwl
jobs:
build-sps-airflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for SPS Airflow Docker image
id: metascheduler
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.SPS_AIRFLOW }}
- name: Build and push SPS Airflow Docker image
uses: docker/build-push-action@v5
with:
context: .
file: airflow/docker/custom_airflow/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.SPS_AIRFLOW }}:${{ env.TAG }}
labels: ${{ steps.metascheduler.outputs.labels }}
build-sps-docker-cwl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for SPS Docker CWL image
id: metascheduler
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.SPS_DOCKER_CWL }}
- name: Build and push SPS Docker CWL image
uses: docker/build-push-action@v5
with:
context: ./airflow/docker/cwl
file: airflow/docker/cwl/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.SPS_DOCKER_CWL }}:${{ env.TAG }}
labels: ${{ steps.metascheduler.outputs.labels }}