Separate platform builds & combine to single manifest

This commit is contained in:
Cyber MacGeddon 2026-04-13 23:14:37 +01:00
parent 5108b3db95
commit 5e6c96bdd1
2 changed files with 89 additions and 18 deletions

View file

@ -40,10 +40,62 @@ jobs:
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
deploy-container-image:
build-platform-image:
name: Release container images
name: Build ${{ matrix.container }} (${{ matrix.platform }})
runs-on: ubuntu-24.04
permissions:
contents: write
id-token: write
environment:
name: release
strategy:
matrix:
container:
- base
- flow
- bedrock
- vertexai
- hf
- ocr
- unstructured
- mcp
platform:
- amd64
- arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU - for ARM emulation
if: matrix.platform == 'arm64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Docker Hub token
run: echo ${{ secrets.DOCKER_SECRET }} > docker-token.txt
- name: Authenticate with Docker hub
run: make docker-hub-login
- name: Get version
id: version
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build container
run: make platform-${{ matrix.container }}-${{ matrix.platform }} VERSION=${{ steps.version.outputs.VERSION }}
- name: Push container
run: make push-platform-${{ matrix.container }}-${{ matrix.platform }} VERSION=${{ steps.version.outputs.VERSION }}
combine-manifests:
name: Combine manifest ${{ matrix.container }}
runs-on: ubuntu-24.04
needs: build-platform-image
permissions:
contents: write
id-token: write
@ -66,11 +118,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU - for ARM emulation
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Docker Hub token
run: echo ${{ secrets.DOCKER_SECRET }} > docker-token.txt
@ -81,12 +128,5 @@ jobs:
id: version
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Put version into package manifests
run: make update-package-versions VERSION=${{ steps.version.outputs.VERSION }}
- name: Build container - ${{ matrix.container }}
run: make manifest-${{ matrix.container }} VERSION=${{ steps.version.outputs.VERSION }}
- name: Push container - ${{ matrix.container }}
run: make push-manifest-${{ matrix.container }} VERSION=${{ steps.version.outputs.VERSION }}
- name: Combine and push manifest
run: make combine-manifest-${{ matrix.container }} VERSION=${{ steps.version.outputs.VERSION }}