From df31ec3aee3a0d88afbd9f6e26c3f2bfd378f09b Mon Sep 17 00:00:00 2001 From: shenlan Date: Sun, 14 Sep 2025 20:20:49 +0800 Subject: [PATCH] fix: sanitize images extraction --- .github/workflows/offline-package-apisix-gateway.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/offline-package-apisix-gateway.yaml b/.github/workflows/offline-package-apisix-gateway.yaml index cab53ee..77bbcb1 100644 --- a/.github/workflows/offline-package-apisix-gateway.yaml +++ b/.github/workflows/offline-package-apisix-gateway.yaml @@ -77,10 +77,11 @@ jobs: run: | set -euo pipefail helm template apisix apisix/apisix --version "${CHART_VERSION}" > manifest.yaml - images=$(grep -oP 'image:\s*\K[^\s]+' manifest.yaml | sort -u) + images=$(grep -oP 'image:\s*\K[^\s]+' manifest.yaml | tr -d '"' | sort -u) for img in $images; do + [ -z "$img" ] && continue docker pull "$img" - safe=$(echo $img | tr '/:' '-_') + safe=$(echo "$img" | tr '/:' '-_') docker save "$img" -o offline-installer/images/${safe}.tar done