Skip to content

.github/workflows/build-and-push-docker-image.yml #10

.github/workflows/build-and-push-docker-image.yml

.github/workflows/build-and-push-docker-image.yml #10

on:
workflow_dispatch:
inputs:
langscout-ingest-image-tag:
description: 'Langscout Ingress Docker image tag'
required: false
langscout-ui-image-tag:
description: 'Langscout UI Docker image tag'
required: false
langscout-api-image-tag:
description: 'Langscout API Docker image tag'
required: false
jobs:
push_ingest_to_ghcr:
if: ${{ !cancelled() && inputs.langscout-ingest-image-tag != null }}
name: Build and push Langscout ingest component to Github Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Log in to the Container registry
uses: docker/login-action@3b8fed7e4b60203b2aa0ecc6c6d6d91d12c06760
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get metadata for Docker build
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
with:
images: ghcr.io/${{ github.repository_owner }}/langscout-ingest
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}},value=${{ inputs.langscout-ingest-image-tag }}
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
with:
file: ./Dockerfile.ingest
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push_ui_to_ghcr:
if: ${{ !cancelled() && inputs.langscout-ui-image-tag != null }}
name: Build and push Langscout UI component to Github Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Log in to the Container registry
uses: docker/login-action@3b8fed7e4b60203b2aa0ecc6c6d6d91d12c06760
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get metadata for Docker build
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
with:
images: ghcr.io/${{ github.repository_owner }}/langscout-ui
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}},value=${{ inputs.langscout-ui-image-tag }}
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
with:
file: ./Dockerfile.ui
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# This is here to placate the build process and can be overridden at runtime.
build-args: |
LANGSCOUT_API_URL=http://localhost:1994
push_api_to_ghcr:
if: ${{ !cancelled() && inputs.langscout-api-image-tag != null }}
name: Build and push Langscout API component to Github Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Log in to the Container registry
uses: docker/login-action@3b8fed7e4b60203b2aa0ecc6c6d6d91d12c06760
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get metadata for Docker build
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
with:
images: ghcr.io/${{ github.repository_owner }}/langscout-api
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}},value=${{ inputs.langscout-api-image-tag }}
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
with:
file: ./Dockerfile.api
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}