Skip to content

feat: add responses and files api endpoint (#387) #211

feat: add responses and files api endpoint (#387)

feat: add responses and files api endpoint (#387) #211

name: Build Container images
# this workflow will be triggered manually from workflows needing the images
on:
push:
branches:
- 'main'
tags-ignore:
- "**"
pull_request:
paths:
- .github/workflows/build-container-images.yaml
workflow_call:
inputs:
push-to-registry:
required: false
type: boolean
default: false
tag-prefix:
required: false
type: string
default: ''
jobs:
build-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
service:
- name: bundled
containerfile: Dockerfile
context: .
- name: backend
containerfile: backend/Dockerfile
context: backend/
- name: frontend
containerfile: frontend/Dockerfile
context: frontend/
- name: reis
containerfile: services/reis/Dockerfile
context: services/reis/
- name: confluence-importer
containerfile: services/confluence-importer/Dockerfile
context: services/confluence-importer/
steps:
- uses: actions/checkout@v5
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
context: ${{ matrix.service.context }}
file: ${{ matrix.service.containerfile }}
tags: ${{ inputs.tag-prefix }}${{ matrix.service.name }}:commit-${{ github.sha }}
outputs: ${{ inputs.push-to-registry && 'type=registry' || format('type=docker,dest=/tmp/{0}.tar', matrix.service.name) }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.service.name }}
path: /tmp/${{ matrix.service.name }}.tar
retention-days: 2