fix(ci): set env vars for node manifest source generation

This commit is contained in:
2026-02-10 11:39:18 +07:00
parent 479a86de21
commit da241d7e72

View File

@@ -176,14 +176,14 @@ jobs:
# Derive source tags from build_matrix_json using Node (available in Actions runners). # Derive source tags from build_matrix_json using Node (available in Actions runners).
# Each source is "${IMAGE}:${SHA_TAG}-<arch>" where <arch> from platform suffix. # Each source is "${IMAGE}:${SHA_TAG}-<arch>" where <arch> from platform suffix.
mapfile -t sources < <(node -e ' mapfile -t sources < <(IMAGE="${IMAGE}" SHA_TAG="${SHA_TAG}" node -e '
const m = JSON.parse(process.env.BUILD_MATRIX_JSON); const m = JSON.parse(process.env.BUILD_MATRIX_JSON);
for (const it of m) { for (const it of m) {
const arch = String(it.platform || "").split("/").pop(); const arch = String(it.platform || "").split("/").pop();
if (!arch) process.exit(2); if (!arch) process.exit(2);
console.log(`${process.env.IMAGE}:${process.env.SHA_TAG}-${arch}`); console.log(`${process.env.IMAGE}:${process.env.SHA_TAG}-${arch}`);
} }
' IMAGE="${IMAGE}" SHA_TAG="${SHA_TAG}") ')
if [[ "${#sources[@]}" -eq 0 ]]; then if [[ "${#sources[@]}" -eq 0 ]]; then
echo "No build sources resolved from build_matrix_json" >&2 echo "No build sources resolved from build_matrix_json" >&2
@@ -266,4 +266,3 @@ jobs:
DOCKER_IMAGE: ${{ needs.manifest.outputs.image_ref }} DOCKER_IMAGE: ${{ needs.manifest.outputs.image_ref }}
run: | run: |
docker compose ${{ inputs.compose_args }} docker compose ${{ inputs.compose_args }}