39da00d486
- Move CI/release workflows from .github/workflows to .gitea/workflows (Gitea Actions), targeting the master branch. - docker-publish: push to the Gitea container registry (git.finalfactory.de) with a lowercased image name; login via github.token or a PACKAGES_TOKEN secret. - version-tag: gitea-actions bot identity; optional RELEASE_TOKEN to re-trigger the image build. - Update README/CLAUDE.md/Unraid template/build-and-push.ps1 to the Gitea registry + master. Claude-Session: https://claude.ai/code/session_01WujdMtMJPbxDpDnMeK22rr
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
# Gitea Actions: builds and pushes the multi-arch MeterVault image on a vX.Y.Z tag (SDD §11).
|
|
# Pushes to the Gitea container registry on this host. Requires a Docker-capable act_runner and
|
|
# a token with package:write — the built-in ${{ github.token }} works if the runner is configured
|
|
# to allow package writes; otherwise set a PACKAGES_TOKEN secret (a PAT with write:package).
|
|
name: docker-publish
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
workflow_dispatch: {}
|
|
|
|
env:
|
|
REGISTRY: git.finalfactory.de
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Derive version and lowercase image name
|
|
id: meta
|
|
run: |
|
|
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
|
echo "image=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: docker/setup-qemu-action@v3
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to the Gitea registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.PACKAGES_TOKEN || github.token }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: deploy/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.version }}
|
|
${{ env.REGISTRY }}/${{ steps.meta.outputs.image }}:latest
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|