feat: 建立测试留痕与Docker云部署流程

This commit is contained in:
NathanAlex7
2026-09-10 11:35:42 +08:00
parent 549fd069be
commit c57d291f65
12 changed files with 478 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -Eeuo pipefail
if [[ $# -lt 2 || $# -gt 4 ]]; then
echo "Usage: $0 <acr-registry> <namespace> [repository] [tag]" >&2
exit 2
fi
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
registry="$1"
namespace="$2"
repository="${3:-mini-openclaw}"
tag="${4:-$(git -C "$root" rev-parse --short HEAD)}"
[[ "$registry" == *.aliyuncs.com ]] || { echo "ACR registry must end in .aliyuncs.com" >&2; exit 2; }
image="${registry}/${namespace}/${repository}:${tag}"
python "$root/scripts/verify.py"
docker build --pull -t "$image" "$root"
docker push "$image"
echo "Published immutable image: $image"