Your Name d64189d859
Some checks failed
Gitea Actions Demo / Build (push) Failing after 15s
:-'Generic Commit'
2025-05-30 00:28:07 +12:00

28 lines
448 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
function build_image() {
local dockerfile="$1"
local image_name="${dockerfile//Dockerfile./}"
docker build -t "$image_name:latest" -f "$dockerfile" .
}
pids=()
for dockerfile in Dockerfile.*; do
(
build_image "$dockerfile"
) &
pids+=($!)
done
fail=0
for pid in "${pids[@]}"; do
wait "$pid" || fail=1
done
if (( fail )); then
echo "One or more builds failed."
exit 1
fi