From e46a6fb4cbb8f494a00e9bbe9d9cef4a681e7e78 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 30 Sep 2023 03:31:43 +0200 Subject: [PATCH] fix TARGET_FILTER corner case for SDKs If a TARGET_FILTER is set only imagebuilder/sdk/rootfs for that target are created. In case of the SDK multiple valid targets are in the same row printed via `dump-target-info.pl`. With the previous logic the "first" target is used expecting all targets to be on the same commit. However when using TARGET_FILTER the specific target should be used for the SDK, not just one that supports the same architecture. A logic is added that if TARGET_FILTER is set, it's used as the SDK target. Signed-off-by: Paul Spooren --- .github/workflows/containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 9749df7..8087067 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -140,7 +140,7 @@ jobs: while read -r line; do ARCH=$(echo "$line" | cut -d " " -f 1) - TARGET=$(echo "$line" | cut -d " " -f 2) + [ -z "$TARGET_FILTER" ] && TARGET=$(echo "$line" | cut -d " " -f 2) || TARGET="$TARGET_FILTER" TARGETS=$(echo "$line" | cut -d " " -f 2- | sed -e 's/ /\\n/g') [[ $FIRST -ne 1 ]] && JSON="$JSON"','