From e92843eb36221941e134965415789b68278d6198 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 07:29:14 +0000 Subject: [PATCH] Use awk for arch_list extraction to match build_from approach Replace fragile sed '/^arch:/,/^[^ a]/p' pattern with the same awk block-parsing approach used for build_from. The sed pattern leaked lines from keys starting with 'a' (like audio:) into the range before grep filtered them out. The awk approach cleanly stops at the next top-level key. Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/d3d7f769-ce2d-4ddd-b066-7bb769754460 --- .github/workflows/onpush_builder.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/onpush_builder.yaml b/.github/workflows/onpush_builder.yaml index 303693eed..46fba6045 100644 --- a/.github/workflows/onpush_builder.yaml +++ b/.github/workflows/onpush_builder.yaml @@ -167,7 +167,11 @@ jobs: image=$(grep -m1 '^image:' "config.$ext" | sed 's/^image:[[:space:]]*//' | tr -d "\"'") name=$(grep -m1 '^name:' "config.$ext" | sed 's/^name:[[:space:]]*//' | tr -d "\"'") description=$(grep -m1 '^description:' "config.$ext" | sed 's/^description:[[:space:]]*//' | tr -d "\"'") - arch_list=$(sed -n '/^arch:/,/^[^ a]/p' "config.$ext" | grep '^ *-' | sed 's/^ *- *//' | tr -d "\"'" | jq -R -s -c 'split("\n") | map(select(length > 0))') + arch_list=$(awk ' + /^arch:/ { inblock=1; next } + /^[^[:space:]]/ { if (inblock) exit } + inblock && /^[[:space:]]/ { print } + ' "config.$ext" | sed 's/^ *- *//' | tr -d "\"'" | jq -R -s -c 'split("\n") | map(select(length > 0))') fi break fi