Skip to content

Merge pull request #53 from dotconfig404/main #33

Merge pull request #53 from dotconfig404/main

Merge pull request #53 from dotconfig404/main #33

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 }}
server_version: ${{ steps.server_version.outputs.server_version }}
db_version: ${{ steps.db_version.outputs.db_version }}
steps:
- name: Source checkout
uses: actions/checkout@v4
- name: 'Setup yq'
uses: dcarbone/[email protected]
- id: set-matrix
run: echo "matrix=$(yq -o json build_versions.yaml | jq -c)" >> $GITHUB_OUTPUT
- id: server_version
run: echo "server_version=$(yq '.include[1].server_version' build_versions.yaml )" | cut -d- -f1 >> $GITHUB_OUTPUT
- id: db_version
run: echo "db_version=$(yq '.include[1].db_version' build_versions.yaml)" | cut -d- -f1 >> $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 }}
OPENVOXSERVER_VERSION=${{ matrix.server_version }}
OPENVOXDB_VERSION=${{ matrix.db_version }}
R10K_VERSION=${{ matrix.r10k_version }}
RUGGED_VERSION=${{ matrix.rugged_version }}
build_arch: linux/amd64
build_context: openvoxserver
buildfile: openvoxserver/Containerfile
tags: |
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
- name: Build Alpine OpenVox Server ${{ matrix.release }} container
if: ${{ matrix.release == '8' }}
uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_args: |
OPENVOX_RELEASE=${{ matrix.release }}
OPENVOXSERVER_VERSION=${{ needs.setup-matrix.outputs.server_version }}
OPENVOXDB_VERSION=${{ needs.setup-matrix.outputs.db_version }}
R10K_VERSION=${{ matrix.r10k_version }}
build_arch: linux/amd64
build_context: openvoxserver
buildfile: openvoxserver/Containerfile.alpine
tags: |
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
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 }}
OPENVOXSERVER_VERSION=${{ matrix.server_version }}
OPENVOXDB_VERSION=${{ matrix.db_version }}
R10K_VERSION=${{ matrix.r10k_version }}
RUGGED_VERSION=${{ matrix.rugged_version }}
build_arch: linux/arm64
build_context: openvoxserver
buildfile: openvoxserver/Containerfile
tags: |
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64
- name: Build Alpine OpenVox Server ${{ matrix.release }} container
if: ${{ matrix.release == '8' }}
uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_args: |
OPENVOX_RELEASE=${{ matrix.release }}
OPENVOXSERVER_VERSION=${{ needs.setup-matrix.outputs.server_version }}
OPENVOXDB_VERSION=${{ needs.setup-matrix.outputs.db_version }}
R10K_VERSION=${{ matrix.r10k_version }}
build_arch: linux/arm64
build_context: openvoxserver
buildfile: openvoxserver/Containerfile.alpine
tags: |
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine
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: Create multi arch manifests
run: |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-${{ github.ref_name }} \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-latest \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-latest \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }} \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:latest \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:8-${{ 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/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-${{ github.ref_name }} \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-latest \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ matrix.release }}-latest \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ matrix.release }} \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:latest \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-x86_64
- name: Create Alpine multi arch manifests
if: ${{ matrix.release == '8' }}
run: |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-${{ github.ref_name }}-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-latest-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-latest-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:latest-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-x86_64-alpine
# on docker.io we use the voxpupuli namespace because new organizations are not free anymore
#
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-${{ github.ref_name }}-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ needs.setup-matrix.outputs.server_version }}-latest-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ matrix.release }}-latest-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ matrix.release }}-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-x86_64-alpine
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:latest-alpine-beta \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-arm64-alpine \
ghcr.io/openvoxproject/openvoxserver:8-${{ github.sha }}-x86_64-alpine
update-dockerhub-description:
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- create-multi-arch-manifests
steps:
- name: Source checkout
uses: actions/checkout@v4
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: voxpupulibot
password: ${{ secrets.DOCKERHUB_BOT_ADMIN_TOKEN }}
repository: voxpupuli/openvoxserver