change build behaviour to support dynamic package selection
Build Alpine Packages / preflight (pull_request) Successful in 5s
Build Alpine Packages / verify-and-publish (pull_request) Canceled after 0s
Build Alpine Packages / build (pull_request) Canceled after 7m9s

This commit is contained in:
Joachim Schlöffel
2026-10-07 14:02:11 +02:00
parent b40ccdf370
commit 55ce31db00
2 changed files with 7 additions and 38 deletions
+3 -1
View File
@@ -111,7 +111,7 @@ registry_upgrade_packages() {
}
prepare() {
local selected
local build_matrix selected
declare -A selected_map=()
download_registry_metadata
@@ -138,7 +138,9 @@ prepare() {
} >> "${GITHUB_ENV}"
fi
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
build_matrix="$({ printf '%s\n' "${ALPINE_PACKAGES}" | tr ' ' '\n' | jq -Rsc 'split("\n") | map(select(length > 0)) | {package: .}'; })"
printf 'selected_packages=%s\n' "${ALPINE_PACKAGES}" >> "${GITHUB_OUTPUT}"
printf 'build_matrix=%s\n' "${build_matrix}" >> "${GITHUB_OUTPUT}"
if [[ -n "${ALPINE_PACKAGES}" ]]; then
printf 'packages_selected=true\n' >> "${GITHUB_OUTPUT}"
else