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
33 lines
1.1 KiB
PowerShell
33 lines
1.1 KiB
PowerShell
#!/usr/bin/env pwsh
|
|
# Local convenience: build the multi-arch MeterVault image and push it.
|
|
# Usage: ./deploy/build-and-push.ps1 -Registry git.finalfactory.de -Image finalfactory/metervault -Push
|
|
# Version is read from the VERSION file; images are tagged :<version> and :latest.
|
|
|
|
param(
|
|
[string]$Registry = "git.finalfactory.de",
|
|
[string]$Image = "finalfactory/metervault",
|
|
[string[]]$Platforms = @("linux/amd64", "linux/arm64"),
|
|
[switch]$Push
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$version = (Get-Content (Join-Path $root "VERSION")).Trim()
|
|
$ref = "$Registry/$Image"
|
|
|
|
Write-Host "Building $ref:$version ($($Platforms -join ', '))" -ForegroundColor Cyan
|
|
|
|
$args = @(
|
|
"buildx", "build",
|
|
"--platform", ($Platforms -join ","),
|
|
"-f", (Join-Path $root "deploy/Dockerfile"),
|
|
"-t", "$ref`:$version",
|
|
"-t", "$ref`:latest"
|
|
)
|
|
if ($Push) { $args += "--push" } else { $args += "--load" }
|
|
$args += $root
|
|
|
|
& docker @args
|
|
if ($LASTEXITCODE -ne 0) { throw "docker buildx build failed" }
|
|
Write-Host "Done." -ForegroundColor Green
|