Files
fex-bedrock-vanilla/.github/workflows/ci.yml
T
renovate[bot]andGeoff Bourne d2638da5b2 chore: Configure Renovate (#601)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
2026-02-23 15:20:00 -06:00

80 lines
2.3 KiB
YAML

name: CI
on:
push:
branches:
- master
- test/**
tags:
- "[0-9]+.[0-9]+.[0-9]+"
paths-ignore:
- README.md
- "examples/**"
- "docs/**"
- "renovate.json5"
pull_request:
branches:
- master
paths-ignore:
- README.md
- "examples/**"
- "docs/**"
- "renovate.json5"
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'itzg/docker-minecraft-bedrock-server'
env:
IMAGE_BASE_NAME: minecraft-bedrock-server
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Docker Metadata action
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ github.repository_owner }}/${{ env.IMAGE_BASE_NAME }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_BASE_NAME }}
flavor: |
latest=${{ github.event_name == 'push' && github.ref_name == 'master' }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
provenance: false
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: |
${{ steps.meta.outputs.labels }}
manymine.enable=true
pull: true
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
cache-from: type=gha
cache-to: type=gha,mode=max