Merge pull request #25 from OpenVoxProject/release-v1.0.0 #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish a 🛢️ container | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
setup-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Source checkout | |
uses: actions/checkout@v5 | |
- name: 'Setup yq' | |
uses: dcarbone/[email protected] | |
- id: set-matrix | |
run: echo "matrix=$(yq -o json build_versions.yaml | jq -c)" >> $GITHUB_OUTPUT | |
build-X86-container: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
needs: setup-matrix | |
strategy: | |
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | |
steps: | |
- name: Build OpenVox Server ${{ matrix.release }} container | |
uses: voxpupuli/gha-build-and-publish-a-container@v2 | |
with: | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
build_args: | | |
OPENVOX_RELEASE=${{ matrix.release }} | |
OPENVOXAGENT_VERSION=${{ matrix.agent_version }} | |
build_arch: linux/amd64 | |
build_context: . | |
buildfile: Containerfile | |
tags: | | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
build-ARM-container: | |
runs-on: ubuntu-24.04-arm | |
permissions: | |
contents: read | |
packages: write | |
needs: setup-matrix | |
strategy: | |
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | |
steps: | |
- name: Build OpenVox Server ${{ matrix.release }} container | |
uses: voxpupuli/gha-build-and-publish-a-container@v2 | |
with: | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
build_args: | | |
OPENVOX_RELEASE=${{ matrix.release }} | |
OPENVOXAGENT_VERSION=${{ matrix.agent_version }} | |
build_arch: linux/arm64 | |
build_context: . | |
buildfile: Containerfile | |
tags: | | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 | |
create-multi-arch-manifests: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
needs: | |
- setup-matrix | |
- build-X86-container | |
- build-ARM-container | |
strategy: | |
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | |
steps: | |
- name: Log in to the ghcr.io registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log in to the docker.io registry | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: voxpupulibot | |
password: ${{ secrets.DOCKERHUB_BOT_ADMIN_TOKEN }} | |
- name: Extract version number | |
id: extract_version | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const agentVersion = '${{ matrix.agent_version }}'; | |
const version = agentVersion.split('-')[0]; | |
core.setOutput('version', version); | |
- name: Create multi arch manifests | |
run: | | |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxagent:${{ steps.extract_version.outputs.version }}-${{ github.ref_name }} \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxagent:${{ steps.extract_version.outputs.version }}-latest \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-latest \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }} \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxagent:latest \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
# on docker.io we use the voxpupuli namespace because new organizations are not free anymore | |
docker buildx imagetools create -t docker.io/voxpupuli/openvoxagent:${{ steps.extract_version.outputs.version }}-${{ github.ref_name }} \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t docker.io/voxpupuli/openvoxagent:${{ steps.extract_version.outputs.version }}-latest \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t docker.io/voxpupuli/openvoxagent:${{ matrix.release }}-latest \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t docker.io/voxpupuli/openvoxagent:${{ matrix.release }} \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
docker buildx imagetools create -t docker.io/voxpupuli/openvoxagent:latest \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-arm64 \ | |
ghcr.io/openvoxproject/openvoxagent:${{ matrix.release }}-${{ github.sha }}-x86_64 | |
update-dockerhub-description: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
needs: | |
- create-multi-arch-manifests | |
steps: | |
- name: Source checkout | |
uses: actions/checkout@v5 | |
- name: Update Docker Hub Description | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: voxpupulibot | |
password: ${{ secrets.DOCKERHUB_BOT_ADMIN_TOKEN }} | |
repository: voxpupuli/openvoxagent |