2 Commits
v4 ... main

View File

@@ -32,7 +32,7 @@ on:
default: Dockerfile
tag:
description: Optional tag to publish (default: sha-<shortsha>)
description: "Optional tag to publish (default: sha-<shortsha>)"
type: string
default: ""
@@ -176,14 +176,14 @@ jobs:
# 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.
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);
for (const it of m) {
const arch = String(it.platform || "").split("/").pop();
if (!arch) process.exit(2);
console.log(`${process.env.IMAGE}:${process.env.SHA_TAG}-${arch}`);
}
' IMAGE="${IMAGE}" SHA_TAG="${SHA_TAG}")
')
if [[ "${#sources[@]}" -eq 0 ]]; then
echo "No build sources resolved from build_matrix_json" >&2
@@ -266,4 +266,3 @@ jobs:
DOCKER_IMAGE: ${{ needs.manifest.outputs.image_ref }}
run: |
docker compose ${{ inputs.compose_args }}