Merge pull request #151 from svc-design/codex/fix-invalid-reference-format-in-workflow

fix: sanitize images extraction in APISIX offline workflow
This commit is contained in:
shenlan 2025-09-14 20:31:15 +08:00 committed by GitHub
commit b4c13aca30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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