fixing tunnel_host
This commit is contained in:
parent
f291a581c0
commit
8697aa55f1
21
ship.sh
21
ship.sh
|
|
@ -4,9 +4,8 @@
|
|||
# 1. git add -A
|
||||
# 2. git commit (or --allow-empty if nothing staged)
|
||||
# 3. GIT_COMMIT → Docker --build-arg (baked into binaries)
|
||||
# 4. docker login ghcr.io — gh auth token + gh api user (one step; fails if gh/docker not ready)
|
||||
# 5. buildx --push per arch + imagetools manifest (server + client) — always, no skips
|
||||
# 6. git push — always
|
||||
# 4. buildx --push per arch + imagetools manifest (server + client) — uses Docker’s existing ghcr auth (no docker login here)
|
||||
# 5. git push — always
|
||||
#
|
||||
# Configuration (use your machine / repo — no hardcoded owner or registry):
|
||||
# - Remote to parse for ghcr.io/owner/repo: git config ship.remote <name> (default: github)
|
||||
|
|
@ -30,7 +29,7 @@ COMMIT_MSG="$*"
|
|||
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
for cmd in git docker gh; do
|
||||
for cmd in git docker; do
|
||||
command -v "$cmd" >/dev/null 2>&1 || {
|
||||
echo "ship: fatal: missing required command: $cmd" >&2
|
||||
exit 1
|
||||
|
|
@ -89,10 +88,10 @@ echo "==> ship: remote=$GIT_REMOTE ($REMOTE_OWNER/$REMOTE_REPO)"
|
|||
echo "==> ship: registry=$REGISTRY_BASE tags=$TAG_SERVER $TAG_CLIENT"
|
||||
echo "==> ship: platforms=$PLATFORMS"
|
||||
|
||||
echo "==> [1/6] git add -A"
|
||||
echo "==> [1/5] git add -A"
|
||||
git add -A
|
||||
|
||||
echo "==> [2/6] git commit"
|
||||
echo "==> [2/5] git commit"
|
||||
if git diff --cached --quiet; then
|
||||
git commit --allow-empty -m "$COMMIT_MSG"
|
||||
else
|
||||
|
|
@ -103,12 +102,6 @@ GIT_COMMIT="$(git rev-parse HEAD)"
|
|||
BA=(--build-arg "GIT_COMMIT=${GIT_COMMIT}")
|
||||
echo "==> GIT_COMMIT=${GIT_COMMIT}"
|
||||
|
||||
echo "==> [3/6] docker login ghcr.io"
|
||||
if ! printf '%s' "$(gh auth token)" | docker login ghcr.io -u "$(gh api user -q .login)" --password-stdin; then
|
||||
echo "ship: fatal: docker login ghcr.io failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pick_builder() {
|
||||
if [[ -n "$BUILDER_OVERRIDE" ]]; then
|
||||
echo "$BUILDER_OVERRIDE"
|
||||
|
|
@ -142,7 +135,7 @@ push_multi() {
|
|||
[[ -z "$p" ]] && continue
|
||||
slug="$(platform_slug "$p")"
|
||||
arch_tag="${base}:${name}-${slug}"
|
||||
echo "==> [4/6] docker buildx push ${target} ${p} -> ${arch_tag}"
|
||||
echo "==> [3/5] docker buildx push ${target} ${p} -> ${arch_tag}"
|
||||
docker buildx build \
|
||||
"${BA[@]}" \
|
||||
--builder "$builder" \
|
||||
|
|
@ -154,7 +147,7 @@ push_multi() {
|
|||
"$ROOT"
|
||||
arch_refs+=("$arch_tag")
|
||||
done
|
||||
echo "==> [5/6] imagetools manifest ${final_tag}"
|
||||
echo "==> [4/5] imagetools manifest ${final_tag}"
|
||||
docker buildx imagetools create -t "$final_tag" "${arch_refs[@]}"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue