Skip to content

Add Minecraft Bedrock server #6

Add Minecraft Bedrock server

Add Minecraft Bedrock server #6

name: Build (minecraft)
on:
push:
branches: master
paths:
- minecraft/Dockerfile
- minecraft/rootfs/**
- minecraft_bedrock/Dockerfile
- minecraft_bedrock/rootfs/**
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
addon: [minecraft, minecraft_bedrock]
steps:
- uses: actions/checkout@v4
- id: config
name: Extract config version
run: |
awk ' /image:/ { print "image=" $2 }' "$CONFIG_PATH" | tr -d '"' >> "$GITHUB_OUTPUT"
awk ' /version:/ { print "version=" $2 }' "$CONFIG_PATH" | tr -d '"' >> "$GITHUB_OUTPUT"
env:
CONFIG_PATH: "${{ matrix.addon }}/config.yaml"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: publish
name: Push container
uses: docker/build-push-action@v6
with:
context: ${{ matrix.addon }}
platforms: linux/amd64
push: true
tags: |
${{ steps.config.outputs.image }}:${{ steps.config.outputs.version }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}