path-based deterministic tagging

This commit is contained in:
Elijah Duffy
2025-12-07 18:50:19 -08:00
parent a21cb2674a
commit 45bd68d460

View File

@@ -72,7 +72,8 @@ jobs:
# If workflow changed, rebuild all lanes (use basenames)
if grep -qx ".github/workflows/build.yml" <<< "$CHANGED"; then
echo "Workflow changed; rebuilding all lanes."
TARGET_DIRS=("${ALL_NAMES[@]}")
# Use full lane paths (e.g. 'docker/7.4') so downstream steps get deterministic dirs
TARGET_DIRS=("${ALL_LANES[@]}")
else
# Build only lanes with changes under their directories
TARGET_DIRS=()
@@ -81,7 +82,8 @@ jobs:
lane_name="${ALL_NAMES[$idx]}"
# Any change directly under lane dir counts; include Dockerfile or subpaths
if grep -q "^${lane_path}/" <<< "$CHANGED"; then
TARGET_DIRS+=("${lane_name}")
# Append the full lane path (e.g. 'docker/7.4')
TARGET_DIRS+=("${lane_path}")
fi
done
fi