From 5b22bceed2b809676f2546a32da33e5d14382ab0 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Thu, 16 Apr 2026 14:48:22 +0200 Subject: [PATCH] ci: add GitHub Actions workflow to build Docker image Triggers on pushes to server branch or version tags when core/, server/, or Docker files change. Pushes to ghcr.io. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/docker.yml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..b380ddd --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,45 @@ +name: Docker Image + +on: + push: + branches: [server] + tags: ["v*"] + paths: + - "core/**" + - "server/**" + - "Dockerfile" + - "docker-compose.yml" + - ".github/workflows/docker.yml" + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - uses: docker/metadata-action@v5 + id: meta + with: + images: ghcr.io/${{ github.repository }}-server + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=sha,prefix= + + - uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}