Fixing release pipeline
This commit is contained in:
22
scripts/build-containers.sh
Executable file
22
scripts/build-containers.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Get current git tag, fall back to "latest" if no tags exist
|
||||
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "latest")
|
||||
|
||||
echo "Building container images with tag: $TAG"
|
||||
|
||||
# Build all services using docker compose
|
||||
docker compose build --no-cache
|
||||
|
||||
echo "Tagging images for Gitea registry..."
|
||||
|
||||
# Tag all images with the current git tag
|
||||
# Format: git.sschuhmann.de/owner/rehearsalhub/service:tag
|
||||
docker tag rehearsalhub/api:latest git.sschuhmann.de/sschuhmann/rehearshalhub/api:$TAG
|
||||
docker tag rehearsalhub/web:latest git.sschuhmann.de/sschuhmann/rehearshalhub/web:$TAG
|
||||
docker tag rehearsalhub/audio-worker:latest git.sschuhmann.de/sschuhmann/rehearshalhub/worker:$TAG
|
||||
docker tag rehearsalhub/nc-watcher:latest git.sschuhmann.de/sschuhmann/rehearshalhub/watcher:$TAG
|
||||
|
||||
echo "Build complete! Images tagged as: $TAG"
|
||||
echo "Ready for upload to git.sschuhmann.de/sschuhmann/rehearsalhub"
|
||||
Reference in New Issue
Block a user