Creator App Tests / PR Spam Gate (push) Skipped
Frontend Tests / PR Spam Gate (push) Skipped
NPM Format (website & console) / PR Spam Gate (push) Skipped
Pre-commit Checks / PR Spam Gate (push) Skipped
QwenPaw Creator Plugin Release / check-version (push) Canceled after 0s
QwenPaw Creator Plugin Release / upload-oss (push) Canceled after 0s
Tests / PR Spam Gate (push) Skipped
CodeQL / CodeQL (python) (push) Canceled after 0s
CodeQL / CodeQL (typescript) (push) Canceled after 0s
Creator App Tests / Creator Backend Tests (push) Canceled after 0s
Creator App Tests / Creator UI Build & Tests (push) Canceled after 0s
E2E Smoke Tests / Playwright UI Smoke (push) Canceled after 0s
Frontend Tests / Detect console changes (push) Canceled after 0s
NPM Format (website & console) / website format check (push) Canceled after 0s
NPM Format (website & console) / console format check (push) Canceled after 0s
Pre-commit Checks / Pre-commit (push) Canceled after 0s
QwenPaw Data Plugin Release / check-version (push) Canceled after 0s
Tests / Detect code changes (push) Canceled after 0s
Frontend Tests / Vitest Unit Tests (push) Canceled after 0s
Frontend Tests / Frontend Summary (push) Canceled after 0s
QwenPaw Data Plugin Release / upload-oss (push) Canceled after 0s
Tests / Maintainer Approval (push) Canceled after 0s
Tests / Unit Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - fallback (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p2 (push) Canceled after 0s
Tests / Coverage Report (push) Canceled after 0s
Tests / Test Summary (push) Canceled after 0s
77 lines
2.5 KiB
Bash
77 lines
2.5 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
BUILDX_VERSION="v0.31.1"
|
|
PLUGINS_DIR="${DOCKER_CONFIG:-$HOME/.docker}/cli-plugins"
|
|
BUILDX_PLUGIN="$PLUGINS_DIR/docker-buildx"
|
|
|
|
die() { echo "[docker_tag_pre_to_latest] ERROR: $*" >&2; exit 1; }
|
|
log() { echo "[docker_tag_pre_to_latest] $*"; }
|
|
|
|
install_buildx() {
|
|
local os arch suffix url
|
|
case "$(uname -s)" in
|
|
Darwin) os="darwin" ;;
|
|
Linux) os="linux" ;;
|
|
*) die "Unsupported OS: $(uname -s)" ;;
|
|
esac
|
|
case "$(uname -m)" in
|
|
x86_64) arch="amd64" ;;
|
|
aarch64|arm64) arch="arm64" ;;
|
|
*) die "Unsupported arch: $(uname -m)" ;;
|
|
esac
|
|
|
|
suffix="${os}-${arch}"
|
|
url="https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.${suffix}"
|
|
log "Installing buildx ${BUILDX_VERSION} from ${url}"
|
|
mkdir -p "$PLUGINS_DIR"
|
|
|
|
if command -v curl &>/dev/null; then
|
|
curl -fsSL "$url" -o "$BUILDX_PLUGIN"
|
|
elif command -v wget &>/dev/null; then
|
|
wget -q "$url" -O "$BUILDX_PLUGIN"
|
|
else
|
|
die "Need curl or wget to install buildx"
|
|
fi
|
|
|
|
chmod +x "$BUILDX_PLUGIN"
|
|
log "buildx installed at $BUILDX_PLUGIN"
|
|
}
|
|
|
|
require_buildx_imagetools() {
|
|
command -v docker &>/dev/null || die "docker not found in PATH"
|
|
|
|
# Check whether docker recognizes the buildx subcommand
|
|
if ! docker buildx version &>/dev/null; then
|
|
log "docker has no 'buildx' command. Will try to install buildx plugin..."
|
|
install_buildx
|
|
|
|
# Re-check after installation
|
|
if ! docker buildx version &>/dev/null; then
|
|
die $'docker still has no buildx after plugin install.\nPossible causes:\n- You are not using official Docker CLI (e.g. podman-docker / other wrapper)\n- Docker version is too old to load CLI plugins\nFix:\n- Use Docker Desktop / official docker-ce\n- Ensure docker is the official CLI, then re-run.'
|
|
fi
|
|
fi
|
|
|
|
# Check whether imagetools is available (and supports -t)
|
|
docker buildx imagetools create --help &>/dev/null \
|
|
|| die "buildx exists but 'imagetools create' is not available. Please upgrade Docker/buildx."
|
|
}
|
|
|
|
require_buildx_imagetools
|
|
|
|
ACR_REGISTRY="agentscope-registry.ap-southeast-1.cr.aliyuncs.com"
|
|
IMAGE="agentscope/qwenpaw"
|
|
|
|
ACR_PRE="${ACR_REGISTRY}/${IMAGE}:pre"
|
|
ACR_LATEST="${ACR_REGISTRY}/${IMAGE}:latest"
|
|
DH_PRE="docker.io/${IMAGE}:pre"
|
|
DH_LATEST="docker.io/${IMAGE}:latest"
|
|
|
|
log "ACR: ${ACR_PRE} -> ${ACR_LATEST}"
|
|
docker buildx imagetools create -t "$ACR_LATEST" "$ACR_PRE"
|
|
|
|
log "Docker Hub: ${DH_PRE} -> ${DH_LATEST}"
|
|
docker buildx imagetools create -t "$DH_LATEST" "$DH_PRE"
|
|
|
|
log "Done."
|