mirror of
https://github.com/kasperfriend/tortoise-docker.git
synced 2026-08-18 18:44:25 +02:00
Add Docker Compose stack and GHCR publish workflow for Tortoise WoW.
Packages Shyalya/tortoise-wow with MariaDB, one-shot DB init, and nightly image builds for playerbots and no-bots tags.
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
name: Publish to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- ".env.example"
|
||||
pull_request:
|
||||
paths:
|
||||
- "Dockerfile"
|
||||
- "docker/**"
|
||||
- ".github/workflows/publish.yml"
|
||||
schedule:
|
||||
# 00:00 UTC
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
source_ref:
|
||||
description: "Git branch or tag of Shyalya/tortoise-wow to build"
|
||||
required: false
|
||||
default: "playerbots-integration-gh"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- tag: playerbots
|
||||
build_playerbots: "ON"
|
||||
is_latest: true
|
||||
- tag: no-bots
|
||||
build_playerbots: "OFF"
|
||||
is_latest: false
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=${{ matrix.tag }}
|
||||
type=sha,prefix=${{ matrix.tag }}-
|
||||
type=raw,value=latest,enable=${{ matrix.is_latest && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
BUILD_PLAYERBOTS=${{ matrix.build_playerbots }}
|
||||
USE_EXTRACTORS=OFF
|
||||
SOURCE_REPO=https://github.com/Shyalya/tortoise-wow.git
|
||||
SOURCE_REF=${{ github.event.inputs.source_ref || 'playerbots-integration-gh' }}
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
CMAKE_INSTALL_PREFIX=/opt/turtle
|
||||
cache-from: type=gha,scope=${{ matrix.tag }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.tag }}
|
||||
provenance: false
|
||||
Reference in New Issue
Block a user