Skip to content

chore(deps): update actions/checkout action to v6 (#95) #60

chore(deps): update actions/checkout action to v6 (#95)

chore(deps): update actions/checkout action to v6 (#95) #60

---
name: Build and publish a 🛢️ container
on:
push:
branches:
- 'main'
tags:
- '*'
workflow_dispatch:
permissions:
contents: read # minimal required permissions to clone repo
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
build_matrix: ${{ steps.set-build-matrix.outputs.build_matrix }}
tag_matrix: ${{ steps.set-tag-matrix.outputs.tag_matrix }}
steps:
- name: Source checkout
uses: actions/checkout@v6
- name: 'Setup yq'
uses: dcarbone/[email protected]
- id: set-build-matrix
run: echo "build_matrix=$(bash matrix.sh build)" >> $GITHUB_OUTPUT
- id: set-tag-matrix
run: echo "tag_matrix=$(bash matrix.sh tag)" >> $GITHUB_OUTPUT
build-and-push-container:
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write
needs: setup-matrix
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.build_matrix) }}
steps:
- id: server_version
run: echo "server_version=${{ matrix.server_version }}" | cut -d- -f1 >> $GITHUB_OUTPUT
- id: db_version
run: echo "db_version=${{ matrix.db_version }}" | cut -d- -f1 >> $GITHUB_OUTPUT
- 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 }}
JDK_VERSION=${{ matrix.jdk_version }}
build_arch: linux/${{ matrix.platform }}
build_context: openvoxserver
buildfile: openvoxserver/Containerfile
tags: |
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-${{ matrix.platform }}
- name: Build Alpine 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=${{ steps.server_version.outputs.server_version }}
OPENVOXDB_VERSION=${{ steps.db_version.outputs.db_version }}
R10K_VERSION=${{ matrix.r10k_version }}
RUGGED_VERSION=${{ matrix.rugged_version }}
JDK_VERSION=${{ matrix.jdk_version }}
build_arch: linux/${{ matrix.platform }}
build_context: openvoxserver
buildfile: openvoxserver/Containerfile.alpine
tags: |
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-${{ matrix.platform }}-alpine
create-multi-arch-manifests:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs:
- setup-matrix
- build-and-push-container
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.tag_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 }}
- id: server_version
run: echo "server_version=${{ matrix.server_version }}" | cut -d- -f1 >> $GITHUB_OUTPUT
- id: db_version
run: echo "db_version=${{ matrix.db_version }}" | cut -d- -f1 >> $GITHUB_OUTPUT
- name: Create multi arch manifests
run: |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ steps.server_version.outputs.server_version }}-${{ github.ref_name }} \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-amd64
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 }}-amd64
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 }}-amd64
# on docker.io we use the voxpupuli namespace because new organizations are not free anymore
#
docker buildx imagetools create -t docker.io/voxpupuli/openvoxserver:${{ steps.server_version.outputs.server_version }}-${{ github.ref_name }} \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-arm64 \
ghcr.io/openvoxproject/openvoxserver:${{ matrix.release }}-${{ github.sha }}-amd64
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 }}-amd64
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 }}-amd64
- name: Create Alpine multi arch manifests
run: |
docker buildx imagetools create -t ghcr.io/openvoxproject/openvoxserver:${{ steps.server_version.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 }}-amd64-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 }}-amd64-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 }}-amd64-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:${{ steps.server_version.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 }}-amd64-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 }}-amd64-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 }}-amd64-alpine
update-dockerhub-description:
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- create-multi-arch-manifests
steps:
- name: Source checkout
uses: actions/checkout@v6
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v5
with:
username: voxpupulibot
password: ${{ secrets.DOCKERHUB_BOT_ADMIN_TOKEN }}
repository: voxpupuli/openvoxserver