2 Commits
v4 ... main

View File

@@ -32,7 +32,7 @@ on:
default: Dockerfile default: Dockerfile
tag: tag:
description: Optional tag to publish (default: sha-<shortsha>) description: "Optional tag to publish (default: sha-<shortsha>)"
type: string type: string
default: "" default: ""
@@ -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 }}