From 07b34ab1e74ca1ab72056d44146237d71fcbc6ee Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Thu, 9 Apr 2026 10:41:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20test:=20add=20local=20Docker=20p?= =?UTF-8?q?ush=20workflow=20testing=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/test-docker-push.sh | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 scripts/test-docker-push.sh diff --git a/scripts/test-docker-push.sh b/scripts/test-docker-push.sh new file mode 100755 index 0000000..4114095 --- /dev/null +++ b/scripts/test-docker-push.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Test Docker push workflow locally using act +# Usage: scripts/test-docker-push.sh + +set -e + +echo "๐Ÿงช Testing Docker Push Workflow Locally" +echo "======================================" +echo "" + +# Check requirements +if ! command -v act >/dev/null 2>&1; then + echo "โŒ act not found. Please install act first." + echo " brew install act" + exit 1 +fi + +if ! command -v docker >/dev/null 2>&1; then + echo "โŒ Docker not found. Please install Docker first." + exit 1 +fi + +echo "โœ… Requirements met" +echo "" + +# Test the Docker push workflow +echo "1. Testing Docker push workflow with act..." +echo " This may take a few minutes..." +echo "" + +# Run act with the docker-push workflow +act \ + -W .gitea/workflows/docker-push.yaml \ + --job docker-push \ + --secret GITEA_TOKEN=dummy_token \ + --secret PACKAGES_TOKEN=dummy_token \ + --env GITEA_INTERNAL=https://gitea.arcodange.lab/ \ + --env GITEA_EXTERNAL=https://gitea.arcodange.fr/ \ + --env GITEA_ORG=arcodange \ + --env GITEA_REPO=dance-lessons-coach \ + --env CI_REGISTRY=gitea.arcodange.lab + +echo "" +echo "โœ… Local testing complete!" +echo "" +echo "๐Ÿ’ก If the test failed, check:" +echo " - Dockerfile.prod.template syntax" +echo " - Dependency hash calculation" +echo " - Docker build context" +echo " - Go module dependencies" +echo "" +echo "๐Ÿ’ก To test specific scenarios:" +echo " act -W .gitea/workflows/docker-push.yaml --list" +echo " act -W .gitea/workflows/docker-push.yaml --job docker-push --dryrun"