Skip to content

feat: updated to Minetest 5.9 and 5.10-dev #63

feat: updated to Minetest 5.9 and 5.10-dev

feat: updated to Minetest 5.9 and 5.10-dev #63

Workflow file for this run

name: Multiarch build docker image
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE: ghcr.io/ronoaldo/minetestserver
jobs:
multiarch-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- dockerfile: Dockerfile
args: |-
MINETEST_VERSION=master
MINETEST_GAME_VERSION=master
MINETEST_IRRLICHT_VERSION=none
LUAJIT_VERSION=v2.1
tags: |-
5.10.0-dev
unstable
dev
platforms: |-
linux/amd64
linux/arm64
- dockerfile: Dockerfile
args: |-
MINETEST_VERSION=5.9.0
MINETEST_GAME_VERSION=4e402ec39fb1852b148e62637df0b72ae70ecd7d
LUAJIT_VERSION=4e402ec39fb1852b148e62637df0b72ae70ecd7d
tags: |-
stable
stable-5
platforms: |-
linux/amd64
linux/arm64
fail-fast: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract Minetest branch from Dockerfile/args
id: minetest-version
run: |
export MINETEST_VERSION="$(echo "${{ matrix.args }}" | grep MINETEST_VERSION | cut -f 2 -d=)"
export MINETEST_GAME_VERSION="$(echo "${{ matrix.args }}" | grep MINETEST_GAME_VERSION | cut -f 2 -d=)"
export IRRLICHT_VERSION="$(echo "${{ matrix.args }}" | grep IRRLICHT_VERSION | cut -f 2 -d=)"
echo "version=${MINETEST_VERSION}" >> $GITHUB_OUTPUT
echo "game=${MINETEST_GAME_VERSION}" >> $GITHUB_OUTPUT
echo "irrlicht=${IRRLICHT_VERSION}" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
${{ steps.minetest-version.outputs.version }}
${{ matrix.tags }}
- name: Print calculated Docker tags
id: build-tags-check
shell: bash
run: |
echo "${{ steps.meta.outputs.tags }}"
- name: Run integration tests on Dockerfile
id: run-test-build
shell: bash
run: |
MINETEST_VERSION=${{steps.minetest-version.outputs.version}} \
MINETEST_GAME_VERSION=${{steps.minetest-version.outputs.game}} \
MINETEST_IRRLICHT_VERSION=${{steps.minetest-version.outputs.irrlicht}} \
./test/integration-test.sh
- name: Set up QEMU for multiarch builds
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
build-args: ${{ matrix.args }}
platforms: ${{ matrix.platforms }}
push: ${{ github.ref_name == 'main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}