chore: pre-push hook — build image Docker avant chaque push
CI — Tests & Docker Build / Tests (push) Failing after 1m52s
CI — Tests & Docker Build / Build & push image Docker (push) Has been skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 10:43:39 +02:00
parent 8794f0865d
commit 321b664398
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
echo "🐳 Pre-push : build de l'image Docker de production..."
REPO_ROOT=$(git rev-parse --show-toplevel)
VERSION=$(grep '^version' "$REPO_ROOT/build.gradle" | awk -F"'" '{print $2}')
IMAGE="git.goutailler-olivier.com/gato/olhar-api:$VERSION"
if podman build -f "$REPO_ROOT/Dockerfile" -t "$IMAGE" "$REPO_ROOT"; then
echo "✅ Build Docker réussi ($IMAGE)"
else
echo "❌ Build Docker échoué — push annulé"
exit 1
fi