Skip to content

metadata: Add help URL #188

metadata: Add help URL

metadata: Add help URL #188

Workflow file for this run

name: Build Docker images for Blue Nebula server
on:
push:
tags:
- "*"
branches:
- "*"
pull_request:
branches:
- master
workflow_dispatch:
inputs:
include_arm64:
description: Build arm64 Docker image
type: boolean
required: false
default: false
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/server
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Fetch relevant submodules
run: |
git submodule update --init src/enet
git submodule update --init data/maps
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},event=tag
type=ref,event=branch
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker images
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
# enable arm64 by default once native runners are available
platforms: ${{ inputs.include_arm64 && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}