feat: release automation and doc fixes (#238)

* fix: align env vars and config paths in CI and contributing docs

* feat: add automatic docker publishing to ghcr workflow

---------

Co-authored-by: ralksta <ralksta@users.noreply.github.com>
This commit is contained in:
Ralksta
2026-05-31 10:13:53 +02:00
committed by GitHub
parent 93ac4d275d
commit ff77519ea9
3 changed files with 61 additions and 3 deletions

57
.github/workflows/docker-publish.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Publish Docker Image
on:
release:
types: [published]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=sha,format=long
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ id.meta.outputs.tags }}
labels: ${{ id.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max